> I know, it's late, and I assume this is intentional, but wanted to check:

<snip>

> This drive phpgroupware nuts...
>
> (their code needs help, but).

It is in the release notes.  I'm not sure why the behaviour was changed
(other than it really is bad behaviour).

Chris


Sun, 24 Nov 2002 14:55:52 -0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: pg_atoi: zero length string
I know, it's late, and I assume this is intentional, but wanted to check:

on 7.2.3:
$ psql
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

ler=# \d
      List of relations
    Name     | Type  | Owner
-------------+-------+-------
 nat_dal_est | table | ler
(1 row)

ler=# create table z_test(t int);
CREATE
ler=# insert into z_test(t) values('');
INSERT 40606 1
ler=# select * from z_test;
 t
---
 0
(1 row)

ler=# \q
$
Connection to ler-freebie.iadfw.net closed.
$


on 7.3rc1:
$ psql
Welcome to psql 7.3rc1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

ler=# create table z_test(t int);
CREATE TABLE
ler=# insert into z_test(t) values('');
ERROR:  pg_atoi: zero-length string
ler=# \q
$


This drive phpgroupware nuts...

(their code needs help, but).

LER


-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749




Sun, 24 Nov 2002 16:58:10 -0600
Larry Rosenman <ler@lerctr.org>
pg_atoi: zero length string
Bug #1797 filed with the PHPgroupware side of savannah.

LER


--On Sunday, November 24, 2002 14:55:52 -0800 Christopher Kings-Lynne 
<chriskl@familyhealth.com.au> wrote:

>> I know, it's late, and I assume this is intentional, but wanted to check:
>
> <snip>
>
>> This drive phpgroupware nuts...
>>
>> (their code needs help, but).
>
> It is in the release notes.  I'm not sure why the behaviour was changed
> (other than it really is bad behaviour).
>
> Chris



-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749




Sun, 24 Nov 2002 17:33:48 -0600
Larry Rosenman <ler@lerctr.org>
Re: pg_atoi: zero length string
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> It is in the release notes.  I'm not sure why the behaviour was changed
> (other than it really is bad behaviour).

I think someone exhibited a case where COPY behavior was really
confusing because it was silently accepting an empty string for an int
field, instead of giving an error.  Since the behavior seemed obviously
bogus anyway, we were finally motivated to change it.

			regards, tom lane

Sun, 24 Nov 2002 18:59:46 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_atoi: zero length string 