to_char/to_number loses sign

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: to_char/to_number loses sign
Date: 2004-10-23 13:40:35
Message-ID: 200410231540.35363.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

This is from one of the examples in the documentation:

SELECT to_char(-485, '999S');
to_char
---------
485-

The reverse doesn't work as well:

SEKLECT to_number('485-', '999S');
to_number
-----------
485

Is this a bug or intentional?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Elphick 2004-10-23 15:59:26 Re: Slony-I 1.0.4 Released
Previous Message Curt Sampson 2004-10-23 07:33:40 Re: First set of OSDL Shared Mem scalability results, some

Browse pgsql-patches by date

  From Date Subject
Next Message Nicolai Tufar 2004-10-23 17:01:21 (Turkish) New translation: psql
Previous Message Tom Lane 2004-10-23 05:12:02 Re: Example of function returning SETOF RECORD