From: | Mike Mascari <mascarm(at)mascari(dot)com> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Ben-Nes Michael <miki(at)canaan(dot)co(dot)il>, Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, postgresql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: 7.3 -> pg_atoi: zero-length string |
Date: | 2002-12-03 16:40:09 |
Message-ID: | 3DECDE69.5060600@mascari.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
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(at)mascari(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Boes | 2002-12-03 16:56:53 | pg_relcheck gone from 7.3? |
Previous Message | Steve Crawford | 2002-12-03 16:36:10 | Re: Arrays: determining size |
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2002-12-03 16:42:45 | Re: Backend crash with tsearch |
Previous Message | Larry Rosenman | 2002-12-03 16:34:19 | Re: [HACKERS] 7.3 -> pg_atoi: zero-length string |