Re: pg7.3.4: pg_atoi: zero-length string

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: pg7.3.4: pg_atoi: zero-length string
Date: 2003-11-04 11:32:22
Message-ID: 20031104113221.GB14524@libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Markus Wollny 2003-11-04 11:46:44 Re: pg7.3.4: pg_atoi: zero-length string
Previous Message Rob Fielding 2003-11-04 11:21:35 pg7.3.4: pg_atoi: zero-length string