Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: Unnexpected results using to_number()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Andrew Snow <andrew(at)modulus(dot)org>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Re: Unnexpected results using to_number()
Date: 2000-07-10 06:53:15
Message-ID: 25511.963211995@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> On Sun, 9 Jul 2000, Tom Lane wrote:
>> "Andrew Snow" <andrew(at)modulus(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-07-10 07:00:00
Subject: Re: postmaster errors with index on temp table?
Previous:From: Karel ZakDate: 2000-07-10 06:42:31
Subject: Re: [HACKERS] Re: Unnexpected results using to_number()

pgsql-bugs by date

Next:From: Karel ZakDate: 2000-07-10 07:32:37
Subject: Re: Re: [BUGS] Unnexpected results using to_number()
Previous:From: Karel ZakDate: 2000-07-10 06:42:31
Subject: Re: [HACKERS] Re: Unnexpected results using to_number()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group