Re: to_number, to_char inconsistency.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: to_number, to_char inconsistency.
Дата
Msg-id 15740.1360538822@sss.pgh.pa.us
обсуждение исходный текст
Ответ на to_number, to_char inconsistency.  (Jeremy Lowery <jslowery@gmail.com>)
Ответы Re: to_number, to_char inconsistency.  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-general
Jeremy Lowery <jslowery@gmail.com> writes:
> I load and dump text files with currency values in it. The decimal in these
> input and output formats in implied. The V format character works great for
> outputing numeric data:

> # select to_char(123.45, '999V99');
>  to_char
> ---------
>   12345
> (1 row)

> However, when importing data, the V doesn't do the same thing:

> # select to_number('12345', '999V99');

A look at the source code shows that to_number doesn't do anything at
all with the V format code, so this isn't terribly surprising.  It
wouldn't be very hard to make it do the right thing, probably, but
nobody's had that particular itch yet.  Feel free to scratch it and
send a patch ...

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Szymon Guz
Дата:
Сообщение: Re: to_number, to_char inconsistency.
Следующее
От: Andrew Taylor
Дата:
Сообщение: Re: var/log/postgresql deletion mystery Ubuntu 12.10