Re: Null vs. Empty String in Postgres 8.3.8

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com>
Cc: "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 02:49:42
Message-ID: 1139.1270435782@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com> 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='5818' AND group_id='438';
> (This SQL statement worked in a very old version of Postgres)
> and pgsql 8.3.8 returned ERROR: invalid input syntax for integer: ""

You were not getting a NULL there. You were getting an integer zero,
as a result of sloppy input checking in the integer-input routine.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wang, Mary Y 2010-04-05 03:03:13 Re: Null vs. Empty String in Postgres 8.3.8
Previous Message Wang, Mary Y 2010-04-05 02:35:21 Null vs. Empty String in Postgres 8.3.8