Re: [PATCHES] numeric input changes

2004-03-10 Thread Neil Conway
Tom Lane <[EMAIL PROTECTED]> writes: > BTW, did you look at type "numeric"? Or is that okay already? That was already okay AFAIK. I also added some regression tests to verify that numeric accepts leading and trailing whitespace properly. -Neil ---(end of broadcast)-

Re: [PATCHES] numeric input changes

2004-03-10 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > The attached patch changes the rules for input to > int2/int4/int8/float4/float8 to consistently allow leading and > trailing whitespace in the input. BTW, did you look at type "numeric"? Or is that okay already? regards, tom lane

Re: [PATCHES] numeric input changes

2004-03-10 Thread Neil Conway
Neil Conway <[EMAIL PROTECTED]> writes: > I've attached a slightly revised version of the patch, which I've > applied to CVS HEAD. *sigh*, actually attached this time. -Neil Index: src/backend/utils/adt/float.c === RCS file: /var/li

Re: [PATCHES] numeric input changes

2004-03-10 Thread Neil Conway
Neil Conway <[EMAIL PROTECTED]> writes: > The attached patch changes the rules for input to > int2/int4/int8/float4/float8 to consistently allow leading and > trailing whitespace in the input. I've attached a slightly revised version of the patch, which I've applied to CVS HEAD. I realized that pg

Re: [PATCHES] numeric input changes

2004-03-10 Thread Tom Lane
Dennis Bjorklund <[EMAIL PROTECTED]> writes: > By the way, this thing was discussed on irc and I just sent a mail on > -hackers about it, not knowing about this thread here. Yeah, let's take the discussion to -hackers using your message as a base. regards, tom lane --

Re: [PATCHES] numeric input changes

2004-03-10 Thread Dennis Bjorklund
On Wed, 10 Mar 2004, Tom Lane wrote: > > nconway=# select 'Infinity'::float8; > > ERROR: type "double precision" value out of range: overflow > > This works in 7.4 and older releases. Sounds to me like you broke it. It does not work on 7.3 and 7.4 when I try. Looking at the currect cvs code i

Re: [PATCHES] numeric input changes

2004-03-10 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > nconway=# select 'Infinity'::float8; > ERROR: type "double precision" value out of range: overflow > nconway=# select '-Infinity'::float8; > ERROR: type "double precision" value out of range: overflow > I'm inclined to just remove this attempted function

Re: [PATCHES] numeric input changes

2004-03-10 Thread Rod Taylor
> I noticed one bug, or at least instance of bit rot: the float8 code > attempts to parse "Infinity" and "-Infinity" specially. Unfortunately, > this doesn't actually work: Infinity doesn't work for float4 either. ---(end of broadcast)--- TIP 5: H

[PATCHES] numeric input changes

2004-03-10 Thread Neil Conway
The attached patch changes the rules for input to int2/int4/int8/float4/float8 to consistently allow leading and trailing whitespace in the input. This is for conformance with the SQL standard, as discussed in an earlier -patches thread. I also added a bunch more regression tests for the input for