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] Defining a "tinyint" data type - one byte unsigned

2004-03-10 Thread Dennis Bjorklund
On Thu, 11 Mar 2004, Shachar Shemesh wrote: > >It's a bit strange that this int is unsigned and the others are signed. > > > Not that strange if you consider the fact that making it signed will not > leave much room for actually using it. > > In any case, that's just the way it is: > http://ms

Re: [PATCHES] Defining a "tinyint" data type - one byte unsigned

2004-03-10 Thread Shachar Shemesh
Shachar Shemesh wrote: Hmm - replying to my own post. I did cut one corner, in that I did not implement tiny->int8 and tiny->non integers yet. That is, however, an implementation detail rather than a principal problem. If that is the whole problem, I'll add those as well. I would rather, befor

Re: [PATCHES] Defining a "tinyint" data type - one byte unsigned

2004-03-10 Thread Shachar Shemesh
Shachar Shemesh wrote: Tom Lane wrote: I don't think we've really solved the numeric-hierarchy casting problems well enough to be able to stand adding another member of the hierarchy. In particular, what impact is this going to have on implicit typing of integer constants? regards, to

Re: [PATCHES] Defining a "tinyint" data type - one byte unsigned

2004-03-10 Thread Shachar Shemesh
Tom Lane wrote: Shachar Shemesh <[EMAIL PROTECTED]> writes: Attached is a patch to implement "tinyint". I don't think we've really solved the numeric-hierarchy casting problems well enough to be able to stand adding another member of the hierarchy. In particular, what impact is this going

Re: [PATCHES] change output of \dp

2004-03-10 Thread Bruce Momjian
Neil Conway wrote: > Euler Taveira de Oliveira <[EMAIL PROTECTED]> writes: > > I just noticed that \dp outputs "Table" to indicate relations > > (tables, sequences and views) instead of "Relation" or "Name". This > > patch just correct it, using "Name" and attaching its "Type". > > Looks good to m

Re: [PATCHES] change output of \dp

2004-03-10 Thread Neil Conway
Euler Taveira de Oliveira <[EMAIL PROTECTED]> writes: > I just noticed that \dp outputs "Table" to indicate relations > (tables, sequences and views) instead of "Relation" or "Name". This > patch just correct it, using "Name" and attaching its "Type". Looks good to me. > Please apply it under HEA

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

[PATCHES] change output of \dp

2004-03-10 Thread Euler Taveira de Oliveira
Hi, I just noticed that \dp outputs "Table" to indicate relations (tables, sequences and views) instead of "Relation" or "Name". This patch just correct it, using "Name" and attaching its "Type". Without the patch: teste=# \d List of relations Schema | Name | Type | Owner

Re: [PATCHES] Defining a "tinyint" data type - one byte unsigned

2004-03-10 Thread Tom Lane
Shachar Shemesh <[EMAIL PROTECTED]> writes: > Attached is a patch to implement "tinyint". I don't think we've really solved the numeric-hierarchy casting problems well enough to be able to stand adding another member of the hierarchy. In particular, what impact is this going to have on implicit ty

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] Add non-blocking function to /port

2004-03-10 Thread Bruce Momjian
I have applied the following patch to move the non-blocking code into its own /port file for code clarity. This was Peter's suggestion. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive,

[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

Re: [PATCHES] PSQLRC environment variable.

2004-03-10 Thread Bruce Momjian
Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > Tom Lane wrote: > > >> Uh, why is that a good idea? > > > > > Well, suppose you want all your users to use the same psqlrc file. > > > Instead of creating symlinks for every user, you can just set PSQLRC in

[PATCHES] remove log_timestamp, log_pid and log_source_port GUC vars

2004-03-10 Thread Andrew Dunstan
Bruce Momjian wrote: Tom Lane wrote: Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: Please don't. Declare them obsolete for 7.5 and remove them in a later release. Nah, just remove them. We've removed, added and changed so many config options and no-one's ever complained...

Re: [PATCHES] PSQLRC environment variable.

2004-03-10 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Uh, why is that a good idea? > > > Well, suppose you want all your users to use the same psqlrc file. > > Instead of creating symlinks for every user, you can just set PSQLRC in > > /etc/profile and everyone gets