Re: [HACKERS] [GENERAL] 7.3 - pg_atoi: zero-length string

2002-12-03 Thread Lee Kindness
Was it necessary? No idea, you're welcome to search through the pgsql-hackers archives to determine the reasoning behind the change. I believe the change was made by Bruce Momjian (going by the release notes). I only remember reading the discussion in passing. This is also one of the reasons for

Re: [HACKERS] [GENERAL] 7.3 - pg_atoi: zero-length string

2002-12-03 Thread Bruce Momjian
The change was made to tighten up the code to catch errors sooner. There isn't much logic to making '' be 0, and no one could make a case for keeping such a mapping. --- Lee Kindness wrote: Was it necessary? No idea,

Re: [HACKERS] [GENERAL] 7.3 - pg_atoi: zero-length string

2002-12-03 Thread Henner Zeller
Hi, | What is the solution of other dbs ( oracle, db2 .. ) to: | insert into table (num) value (''); ? | | I assume they would fail too. The Oracle behaviour is: --- oracle create table foonum (x number(5)); oracle insert into foonum values (''); oracle select * from foonum; + X

Re: [HACKERS] [GENERAL] 7.3 - pg_atoi: zero-length string

2002-12-03 Thread Bruce Momjian
If we had received more complaints about the change during beta, we would have added a mention that the change would be in 7.4. As we got few complaints, the change went into 7.3, and it is mentioned in the porting section of the release notes (last item): * An empty string ('') is no