Thread
-
PostgreSQL
Om Computer & Software S.R.L. <omc@rdsnet.ro> — 2003-01-10T10:11:44Z
When inserting a row into a table, if there is a varchar column and if in that column the value to be inserted is a zero length string (like ''), then instead of writing a null value, PostgreSQL writes that zero length string. We are able to do this with delphi which generates such sql insert phrases. We contacted Borland, but there was no answer. I don't know if this is a bug, but I'm sure that inserting a null value instead of a zero length string would help us a lot.
-
Re: PostgreSQL
Robert Hentosh <hentosh@io.com> — 2003-01-11T12:28:12Z
On Fri, 10 Jan 2003, Om Computer & Software S.R.L. wrote: > When inserting a row into a table, if there is a varchar column and if > in that column the value to be inserted is a zero length string (like > ''), then instead of writing a null value, PostgreSQL writes that zero > length string. We are able to do this with delphi which generates such > sql insert phrases. We contacted Borland, but there was no answer. I > don't know if this is a bug, but I'm sure that inserting a null value > instead of a zero length string would help us a lot. NULL and an empty string are two different things. NULL is supposed to represent an unknown value. This is similar to NULL in the integer space, where NULL is not the same as a 0. Postgresql is following the spec in this regard.