Re: 7.3 -> pg_atoi: zero-length string - Mailing list pgsql-general

From Bruce Momjian
Subject Re: 7.3 -> pg_atoi: zero-length string
Date
Msg-id 200212031621.gB3GL4k04233@candle.pha.pa.us
Whole thread Raw
In response to Re: 7.3 -> pg_atoi: zero-length string  ("Ben-Nes Michael" <miki@canaan.co.il>)
Responses Re: [HACKERS] 7.3 -> pg_atoi: zero-length string  (Larry Rosenman <ler@lerctr.org>)
List pgsql-general
Ben-Nes Michael wrote:
> Then Why not set it to NULL

Well, it is not NULL, though, it is ''.  They are not the same in
strings (though for some dbms's they are), so I don't see why we would
do that for numerics.

> Seems logic as there is nothing between ''
>
> What is the solution of other dbs ( oracle, db2 .. ) to:
> insert into table (num) value (''); ?

I assume they would fail too.

> Who knows how many application will suffer becouse of this.

Yours is the first, or perhaps second to bring up this issue.
I am sure it is a pain, but it does tighten up some cases where we were
silently mapping '' to 0, and we don't exactly have a flood of problem
reports.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: "Ben-Nes Michael"
Date:
Subject: Re: 7.3 -> pg_atoi: zero-length string
Next
From: Lee Kindness
Date:
Subject: Re: 7.3 -> pg_atoi: zero-length string