Re: Re: [BUGS] Unnexpected results using to_number() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [BUGS] Unnexpected results using to_number()
Date
Msg-id 25511.963211995@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [BUGS] Unnexpected results using to_number()  (Karel Zak <zakkr@zf.jcu.cz>)
Responses Re: Re: [BUGS] Unnexpected results using to_number()  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-hackers
Karel Zak <zakkr@zf.jcu.cz> writes:
> On Sun, 9 Jul 2000, Tom Lane wrote:
>> "Andrew Snow" <andrew@modulus.org> writes:
>>>> # SELECT to_number('12,454.8-', '');
>>>> pqReadData() -- backend closed the channel unexpectedly.
>> 
>> In current sources I get a NULL result, which seems to be what the
>> code author intended originally.  However this seems a little bit

>  my original code not return NULL, but return numeric_in(NULL, 0, 0) for
> this situation.

Yeah, I know.  What did you expect that to produce, if not a NULL?

>> inconsistent --- shouldn't it raise a bad-format error instead?

What do you think about raising an error instead of returning NULL?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: Re: [BUGS] Unnexpected results using to_number()
Next
From: Tom Lane
Date:
Subject: Re: postmaster errors with index on temp table?