Re: casting zero-length strings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: casting zero-length strings
Date
Msg-id 6795.1076992002@sss.pgh.pa.us
Whole thread Raw
In response to casting zero-length strings  (Neil Conway <neilc@samurai.com>)
Responses Re: casting zero-length strings  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> Chris KL recently pointed out to me that we currently don't raise an
> error when attempting to cast a zero-length string to a float:
> Whereas int and numeric reject zero-length strings:

> So, should we fix oid and float?

Yes, surely, unless someone wants to argue for reverting that change
to pg_atoi.  I can't see a reason for having them act inconsistently.

While we are at it we should make sure these functions are all on the
same page about allowing leading/trailing whitespace.  I seem to recall
that the spec says somewhere that both should be allowed ... but right
now I do not think we allow trailing whitespace.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] dollar quoting
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: casting zero-length strings