Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-05 Thread Tim Landscheidt
Peter Hunsberger wrote: >>> I still don't get it.  I do want a zero for the subversion_flags to be >>> stored in the table.  But it returned an error because it didn't like >>> subversion_flags='' in the UPDATE SQL statement. >>> subversion_flags | integer       | not null default 0 >> Right.

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread CaT
On Sun, Apr 04, 2010 at 08:03:13PM -0700, Wang, Mary Y wrote: > I still don't get it. I do want a zero for the subversion_flags to be stored > in the table. But it returned an error because it didn't like > subversion_flags='' in the UPDATE SQL statement. > > subversion_flags | integer

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Peter Hunsberger
On Sun, Apr 4, 2010 at 10:23 PM, Scott Marlowe wrote: > On Sun, Apr 4, 2010 at 9:03 PM, Wang, Mary Y wrote: >> I still don't get it.  I do want a zero for the subversion_flags to be >> stored in the table.  But it returned an error because it didn't like >> subversion_flags='' in the UPDATE SQL

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Scott Marlowe
On Sun, Apr 4, 2010 at 9:03 PM, Wang, Mary Y wrote: > I still don't get it.  I do want a zero for the subversion_flags to be stored > in the table.  But it returned an error because it didn't like > subversion_flags='' in the UPDATE SQL statement. > > subversion_flags | integer       | not null

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Wang, Mary Y
- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Sunday, April 04, 2010 7:50 PM To: Wang, Mary Y Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8 "Wang, Mary Y" writes: > Can someone provide a link to the Postgres 8.x documenta

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Tom Lane
"Wang, Mary Y" writes: > Can someone provide a link to the Postgres 8.x documentation that provides > information about Null vs. Empty String? > Here is the situation: > Currently, the source code performs the following SQL statement : > UPDATE user_group set subversion_flags='' WHERE user_id='5

[GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Wang, Mary Y
Can someone provide a link to the Postgres 8.x documentation that provides information about Null vs. Empty String? Here is the situation: Currently, the source code performs the following SQL statement : UPDATE user_group set subversion_flags='' WHERE user_id='5818' AND group_id='438'; (This SQ

Re: [GENERAL] NULL vs. Empty String

2001-03-14 Thread David Wheeler
On Wed, 14 Mar 2001, Oliver Elphick wrote: > You could write a rule for each table/column that would substitute > NULL for ''. > > However, the concept is all wrong. NULL means "I don't know what > this value is". '' means "I know that this value is an empty string". > Furthermore, having NULLs

Re: [GENERAL] NULL vs. Empty String

2001-03-13 Thread Oliver Elphick
David Wheeler wrote: >Is there a way to get Posgres to assume that a '' insert should be a NULL >insert? And if not, does anyone know of a way to get mod_perl to make that >assumption instead? You could write a rule for each table/column that would substitute NULL for ''. However, the conc

[GENERAL] NULL vs. Empty String

2001-03-13 Thread David Wheeler
Hi All, Apologies for cross-posting. I've ported a mod_perl application from Oracle to PosgreSQL, but have run into a difference that's significant for web work. When I get a form field submitted, if it's empty, mod_perl assumes it to be an empty string (''). When I inserted empty strings into O