pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Patryk Kordylewski <pk@fooby.de>
To: pgsql-bugs@postgresql.org
Subject: Inconsistency between TO_CHAR() and TO_NUMBER()
Date: Mon, 06 May 2013 12:14:42 +0200
Message-ID: <51878292.6080003@fooby.de> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (10+ messages)  latest in thread

Message-ID: <51878292.6080003@fooby.de>
Permalink:  ../51878292.6080003@fooby.de/
Also on:    postgresql.org/message-id/51878292.6080003@fooby.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pk@fooby.de
  Subject: Re: Inconsistency between TO_CHAR() and TO_NUMBER()
  In-Reply-To: <51878292.6080003@fooby.de>
  References: <51878292.6080003@fooby.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox