Inconsistency between TO_CHAR() and TO_NUMBER()

From: Patryk Kordylewski <pk(at)fooby(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Inconsistency between TO_CHAR() and TO_NUMBER()
Date: 2013-05-06 10:14:42
Message-ID: 51878292.6080003@fooby.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

i have the following test-case:

http://psql.privatepaste.com/b3b431851a

We want to convert a TO_CHAR() formated numeric back to numeric using
TO_NUMBER() with the same format string. This does not work with a
german locale.

By removing the FM prefix and using the exact amount of digits in the
format string for TO_NUMBER() it starts to work. Switching the locale
back to en_US does work too.

Is this a bug or am i missing something?

Thanks!

Best regards,
Patryk

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message jvalssilva 2013-05-06 12:57:49 BUG #8137: Instalação aparece erro
Previous Message Heikki Linnakangas 2013-05-06 07:21:46 Re: BUG #8135: current_setting('DateStyle'); does not reflect User setting