Re: 7.3 -> pg_atoi: zero-length string

Поиск
Список
Период
Сортировка
Искать
От
Mike Mascari
Тема
Re: 7.3 -> pg_atoi: zero-length string
Дата
Msg-id
3DECDE69.5060600@mascari.com
Список
Дерево обсуждения
Re: 7.3 -> pg_atoi: zero-length string Mike Mascari <mascarm@mascari.com>
Bruce Momjian wrote:
> Ben-Nes Michael wrote:
> 
>>Then Why not set it to NULL
> 
> Well, it is not NULL, though, it is ''.  They are not the same in
> strings (though for some dbms's they are), so I don't see why we would
> do that for numerics.
> 
>>Seems logic as there is nothing between ''
>>
>>What is the solution of other dbs ( oracle, db2 .. ) to:
>>insert into table (num) value (''); ?
> 
> I assume they would fail too.

Oracle doesn't fail because it converts an empty string into 
NULL. So the insert succeeds if the column lacked a NOT NULL 
constraint. But Oracle's treatment of empty strings as NULL *is 
insane*. Not sure about DB2...

Mike Mascari
mascarm@mascari.com


В списке pgsql-general по дате отправления
От: Steve Crawford
Дата:
Сообщение: Re: Arrays: determining size
От: Jeff Boes
Дата:
Сообщение: pg_relcheck gone from 7.3?
FAQ