Re: [HACKERS] Ancient bug in formatting.c/to_char()

2014-07-02 Thread Peter Geoghegan
Where are we on this? -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Ancient bug in formatting.c/to_char()

2014-05-29 Thread Peter Geoghegan
On Thu, May 29, 2014 at 3:09 AM, Heikki Linnakangas wrote: > Yeah, the code is pretty crufty, I'm not sure what the proper fix would be. > I wonder if psprintf would be useful. I don't know that it's worth worrying about the case you highlight. It is certainly worth worrying about the lack of a

Re: [HACKERS] Ancient bug in formatting.c/to_char()

2014-05-29 Thread Heikki Linnakangas
On 05/29/2014 04:59 AM, Peter Geoghegan wrote: Consider this example: [local]/postgres=# SELECT to_char(1e9::float8,'9D9'); to_char -- 10.0 (1 row) [local]/postgres=# SELECT to_char(1e20::float8,'9D9

[HACKERS] Ancient bug in formatting.c/to_char()

2014-05-28 Thread Peter Geoghegan
Consider this example: [local]/postgres=# SELECT to_char(1e9::float8,'9D9'); to_char -- 10.0 (1 row) [local]/postgres=# SELECT to_char(1e20::float8,'9D9'); to_char 1000