Re: [BUGS] BUG #6216: Calling PQconnectdbParams from C++ with a char**

2011-09-20 Thread Tom Lane
Craig Ringer writes: > As for wording: my *personal* preference is "const char * const" but I > don't know what the opinions of those who work with the code day-to-day are. +1. Isn't the other ordering deprecated by recent C standards? (Or maybe I'm just thinking of where you're supposed to put

Re: [BUGS] BUG #6216: Calling PQconnectdbParams from C++ with a char**

2011-09-20 Thread Craig Ringer
On 21/09/2011 12:05 AM, Lionel Elie Mamane wrote: The following bug has been logged online: Bug reference: 6216 Logged by: Lionel Elie Mamane Email address: lio...@mamane.lu PostgreSQL version: 9.1.0 Operating system: Debian GNU/Linux Description:Calling PQconnectdbP

Re: [BUGS] BUG #6216: Calling PQconnectdbParams from C++ with a char**

2011-09-20 Thread Merlin Moncure
On Tue, Sep 20, 2011 at 11:05 AM, Lionel Elie Mamane wrote: > > The following bug has been logged online: > > Bug reference:      6216 > Logged by:          Lionel Elie Mamane > Email address:      lio...@mamane.lu > PostgreSQL version: 9.1.0 > Operating system:   Debian GNU/Linux > Description:  

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Tom Lane
Greg Stark writes: > On Tue, Sep 20, 2011 at 8:52 PM, Tom Lane wrote: >> However, it would >> be interesting to know what Oracle etc do with NaN and Infinity, >> assuming they even support such numbers. > Note that it looks like NUMBER cannot store either Infinity or NaN. > They can only occur i

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Greg Stark
On Tue, Sep 20, 2011 at 8:52 PM, Tom Lane wrote: > However, it would > be interesting to know what Oracle etc do with NaN and Infinity, > assuming they even support such numbers. Note that it looks like NUMBER cannot store either Infinity or NaN. They can only occur in BINARY_FLOAT and BINARY_DOU

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Kevin Grittner
Tom Lane wrote: > it would be interesting to know what Oracle etc do with NaN and > Infinity, assuming they even support such numbers. > > Currently what our code does for the format-with- case is to > output "#" in all digit positions. It would be plausible for that > to happen in the non

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Tom Lane
"Kevin Grittner" writes: > Tom Lane wrote: >> If we're gonna fix it, we should just fix it, I think. I was >> considering taking a stab at it, but if someone else would like >> to, that's fine too. > I wouldn't mind doing it, but not until after the CF wraps. On the > other hand, isn't this i

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Kevin Grittner
Tom Lane wrote: > "Kevin Grittner" writes: >> Christopher Gernon wrote: >>> to_char() should be able to convert 5.6e-32 to text just as >>> easily as it can convert 5.6e-3. For some reason, it doesn't. > >> Oh, I see your point now, and I agree with you. > >> We should probably at least put

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Christopher Gernon
On Tue, Sep 20, 2011 at 1:39 PM, Kevin Grittner wrote: > These are approximate data types.  On what basis do you think the > values returned in your examples are wrong?  The demonstrated Because PostgreSQL still has access to all the significant digits: test1=# SELECT f FROM t WHERE id = 1;

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Tom Lane
"Kevin Grittner" writes: > Christopher Gernon wrote: >> to_char() should be able to convert 5.6e-32 to text just as easily >> as it can convert 5.6e-3. For some reason, it doesn't. > Oh, I see your point now, and I agree with you. > We should probably at least put this on the TODO list, I thi

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Kevin Grittner
Christopher Gernon wrote: > to_char() should be able to convert 5.6e-32 to text just as easily > as it can convert 5.6e-3. For some reason, it doesn't. Oh, I see your point now, and I agree with you. We should probably at least put this on the TODO list, I think. Any objections? -Kevin -

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Tom Lane
"Chris Gernon" writes: > CREATE TABLE t ( > id serial, > f double precision, > CONSTRAINT t_pk PRIMARY KEY (id) > ); > INSERT INTO t (f) VALUES (0.000563219288); > > SELECT to_char(f, > 'FM90.99

Re: [BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Kevin Grittner
"Chris Gernon" wrote: > The to_char() function gives incorrect output for float values > whose decimal expansion has several digits (more than somewhere > around 14-15) after the decimal point. These are approximate data types. On what basis do you think the values returned in your examples a

[BUGS] BUG #6217: to_char() gives incorrect output for very small float values

2011-09-20 Thread Chris Gernon
The following bug has been logged online: Bug reference: 6217 Logged by: Chris Gernon Email address: kabi...@gmail.com PostgreSQL version: 9.1.0 Operating system: Windows XP Description:to_char() gives incorrect output for very small float values Details: The to_cha

[BUGS] BUG #6216: Calling PQconnectdbParams from C++ with a char**

2011-09-20 Thread Lionel Elie Mamane
The following bug has been logged online: Bug reference: 6216 Logged by: Lionel Elie Mamane Email address: lio...@mamane.lu PostgreSQL version: 9.1.0 Operating system: Debian GNU/Linux Description:Calling PQconnectdbParams from C++ with a char** Details: In C++, a "

[BUGS] BUG #6215: ODBC - ovelflow with the OIDs - Large Objects

2011-09-20 Thread eamanuel
The following bug has been logged online: Bug reference: 6215 Logged by: eamanuel Email address: eaman...@gmail.com PostgreSQL version: 8.4 Operating system: Opernsuse 11.3 Description:ODBC - ovelflow with the OIDs - Large Objects Details: Hello my name is Manuel an