Re: pg7.3.4: pg_atoi: zero-length string - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: pg7.3.4: pg_atoi: zero-length string
Date
Msg-id 20031104113221.GB14524@libertyrms.info
Whole thread Raw
In response to pg7.3.4: pg_atoi: zero-length string  (Rob Fielding <rob@dsvr.net>)
Responses Re: pg7.3.4: pg_atoi: zero-length string
Re: pg7.3.4: pg_atoi: zero-length string
List pgsql-general
On Tue, Nov 04, 2003 at 11:21:35AM +0000, Rob Fielding wrote:
>
>
> Hi,
>
> We're currently experiencing a problem where SQL statements are failing
> when entring a '' for not not-null integer columns:

Yes.  This behaviour was made more compliant in 7.3.  It's in the
release notes.

> The above example in just one case where 'aid' can accept a null value.

That's not a null.  It's a zero-length string.

> The use of quotes around all values was established as IIRC pg7.2
> wouldn't accept statements without them. The use of this convention is
> extensive.

You could probably put in a rewrite rule to convert '' to NULL and
allow nulls on the column.  It's the only suggestion I can think of,
short of going back to 7.2.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Afilias Canada                        Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Rob Fielding
Date:
Subject: pg7.3.4: pg_atoi: zero-length string
Next
From: "Markus Wollny"
Date:
Subject: Re: pg7.3.4: pg_atoi: zero-length string