Re: Null vs. Empty String in Postgres 8.3.8

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: "Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Null vs. Empty String in Postgres 8.3.8
Date: 2010-04-05 03:23:47
Message-ID: m2odcc563d11004042023wab049beamfa4acad2d49321e3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Apr 4, 2010 at 9:03 PM, Wang, Mary Y <mary(dot)y(dot)wang(at)boeing(dot)com> 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. '' is not 0. the old version of pgsql converted '' to 0 for
you, incorrectly. Now if you want 0 you need to say 0.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Hunsberger 2010-04-05 03:26:48 Re: Null vs. Empty String in Postgres 8.3.8
Previous Message Wang, Mary Y 2010-04-05 03:03:13 Re: Null vs. Empty String in Postgres 8.3.8