Re: [GENERAL] NOT NULL Issue

2007-09-19 Thread Scott Ribe
Another way is to remember that NULL is a distinguished thing that is absence of a value, not any value of any type, and this applies to all types: - the integer 0 is a value, not null - the date 1/1/1900 (or 1904 or ) is a value, not null - the time 00:00:00 is a value, not null - and the str

Re: [GENERAL] NOT NULL Issue

2007-09-18 Thread Geoffrey Myers
Tom Lane wrote: "Gustav Lindenberg" <[EMAIL PROTECTED]> writes: Why is '' not considered null is postgres (8.1.3) Because they're different. The SQL spec says that an empty string is different from NULL, and so does every database in the world except Oracle. Oracle, however, does not define

Re: [GENERAL] NOT NULL Issue

2007-09-14 Thread Tom Lane
"Gustav Lindenberg" <[EMAIL PROTECTED]> writes: > Why is '' not considered null is postgres (8.1.3) Because they're different. The SQL spec says that an empty string is different from NULL, and so does every database in the world except Oracle. Oracle, however, does not define the standard.

Re: [GENERAL] NOT NULL Issue

2007-09-14 Thread Gregory Stark
"Gustav Lindenberg" <[EMAIL PROTECTED]> writes: > select * from security.users where length(us_username)=0; > Surely this a null. Surely not. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 5

[GENERAL] NOT NULL Issue

2007-09-14 Thread Gustav Lindenberg
Hi Why is '' not considered null is postgres (8.1.3) Currently I have to use the following workaround where I have zero length strings in char fields. select * from security.users where length(us_username)=0; Surely this a null. Apparently not in Postgres. Currently I have to use the followin