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

From Rob Fielding
Subject pg7.3.4: pg_atoi: zero-length string
Date
Msg-id 3FA78BBF.9010803@dsvr.net
Whole thread Raw
Responses Re: pg7.3.4: pg_atoi: zero-length string  (Andrew Sullivan <andrew@libertyrms.info>)
List pgsql-general

Hi,

We're currently experiencing a problem where SQL statements are failing
when entring a '' for not not-null integer columns:

ERROR:  pg_atoi: zero-length string

This was discovered just after a database migration from 7.2 to 7.3.4.

Example:

insert into renewal_cache
                 (dom, expiry, issued, aid) values
                 ('data','2004-03-05','19980305','')

The above example in just one case where 'aid' can accept a null value.
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.

Cheers,

Rob Fielding
Development
Designer Servers Ltd



pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: SELECT question
Next
From: Andrew Sullivan
Date:
Subject: Re: pg7.3.4: pg_atoi: zero-length string