Re: [HACKERS] Current CVS has strange parser for float type

2002-10-19 Thread Teodor Sigaev


Peter Eisentraut wrote:

Teodor Sigaev writes:



wow=# select 5.3::float;
ERROR:  Bad float8 input format '5.3'



Does it accept '5,4'::float?  
Yes, it accepted '5,4'::float format.



--
Teodor Sigaev
[EMAIL PROTECTED]


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] Current CVS has strange parser for float type

2002-10-18 Thread Peter Eisentraut
Teodor Sigaev writes:

 wow=# select 5.3::float;
 ERROR:  Bad float8 input format '5.3'

Does it accept '5,4'::float?  Try running initdb with --locale=C.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Current CVS has strange parser for float type

2002-10-17 Thread Bruce Momjian

Works here:

test= select 5.3::float;
 float8 

5.3
(1 row)

---

Teodor Sigaev wrote:
 wow=# select 5.3::float;
 ERROR:  Bad float8 input format '5.3'
 wow=# select 5.3::float8;
 ERROR:  Bad float8 input format '5.3'
 wow=# select 5.3::float4;
 ERROR:  Bad float4 input format '5.3'
 wow=# select 5.3e-1::float4;
 ERROR:  Bad float4 input format '0.53'
 wow=# select -5.3e-1::float4;
 ERROR:  Bad float4 input format '0.53'
 wow=# select -5.3::float4;
 ERROR:  Bad float4 input format '5.3'
 wow=# select 5.3e2::float4;
 ERROR:  Bad float4 input format '532.222'
 wow=# select version();
 version
 -
   PostgreSQL 7.3b2 on i386-unknown-freebsd4.6, compiled by GCC 2.95.3
 (1 row)
 
 Very strange or I missed something?
 This 'feature' appears only on FreeBSD, Linux works fine.
 
 
 -- 
 Teodor Sigaev
 [EMAIL PROTECTED]
 
 
 
 ---(end of broadcast)---
 TIP 2: you can get off all lists at once with the unregister command
 (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Current CVS has strange parser for float type

2002-10-17 Thread Hannu Krosing
On Thu, 2002-10-17 at 23:34, Teodor Sigaev wrote:
 wow=# select 5.3::float;
 ERROR:  Bad float8 input format '5.3'

Could it be something with locales ?

Try:

select 5,3::float;

-
Hannu




---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Current CVS has strange parser for float type

2002-10-17 Thread Bruce Momjian
Tom Lane wrote:
 I think this is a consequence of the changes made a little while back
 (by Peter IIRC?) in locale handling.  It used to be that we deliberately
 did *not* allow any LC_ setting except LC_MESSAGES to actually take
 effect globally in the backend, and this sort of problem is exactly
 why.  I think we need to revert some aspects of that change.
 
 Bruce, this is a must fix open item ...

Added.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

   P O S T G R E S Q L

  7 . 3  O P E NI T E M S


Current at ftp://momjian.postgresql.org/pub/postgresql/open_items.

Required Changes
---
Schema handling - ready? interfaces? client apps?
Drop column handling - ready for all clients, apps?
Get bison upgrade on postgresql.org for ecpg only (Marc)
Fix vacuum btree bug (Tom)
Fix client apps for autocommit = off
Fix pg_dump to handle 64-bit off_t offsets for custom format (Philip)
Fix local handling of floats

Optional Changes

Add schema dump option to pg_dump
Add/remove GRANT EXECUTE to all /contrib functions?
Missing casts for bit operations
\copy doesn't handle column names
COPY doesn't handle schemas
COPY quotes all table names


Documentation Changes
-
Move documation to gborg for moved projects


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Current CVS has strange parser for float type

2002-10-17 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes:
 On Thu, 2002-10-17 at 23:34, Teodor Sigaev wrote:
 wow=# select 5.3::float;
 ERROR:  Bad float8 input format '5.3'
 Could it be something with locales ?

Oooh, bingo!  On HPUX:

regression=# select 5.3::float;
 float8

5.3
(1 row)

regression=# set lc_numeric = 'de_DE.iso88591';
SET
regression=# select 5.3::float;
ERROR:  Bad float8 input format '5.3'

I think this is a consequence of the changes made a little while back
(by Peter IIRC?) in locale handling.  It used to be that we deliberately
did *not* allow any LC_ setting except LC_MESSAGES to actually take
effect globally in the backend, and this sort of problem is exactly
why.  I think we need to revert some aspects of that change.

Bruce, this is a must fix open item ...

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster