| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
| Cc: | Neil Conway <neilc(at)samurai(dot)com>, pgsql-committers(at)postgresql(dot)org |
| Subject: | Re: pgsql-server/src backend/utils/adt/numutils.c ... |
| Date: | 2002-08-28 05:26:29 |
| Message-ID: | 17984.1030512389@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> It was certainly never documented as something that would work, unless
>> you chanced to read the one comment in numutils.c. A normal person
>> would not expect an empty string to be taken as a valid representation
>> of "zero".
> Well, assuming we are matching atoi, it would make sense to return 0 for
> '', I think.
If we wanted to match atoi, we'd use atoi. pg_atoi exists to provide
more bulletproof behavior --- such as detecting overflow and invalid
input and erroring out when it happens.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian - CVS | 2002-08-28 14:35:37 | pgsql-server/ oc/src/sgml/sql.sgml oc/src/sgml ... |
| Previous Message | Bruce Momjian | 2002-08-28 05:05:17 | Re: pgsql-server/src backend/utils/adt/numutils.c ... |