Re: Casting money to numeric(10,2)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Casting money to numeric(10,2)
Дата
Msg-id 12366.979242522@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Casting money to numeric(10,2)  (Ben Stringer <ben@magicrock.net>)
Список pgsql-general
Ben Stringer <ben@magicrock.net> writes:
> I'm trying to migrate several tables from a 6.5.2 DB to a
> 7.0.2 DB, and having trouble casting money (in the old DB)
> to numeric(10,2) prior to doing a pg_dump.

Hm.  It doesn't seem that there is a cast path from money to anything,
even in latest sources.  You might have to resort to dumping the table
as-is, then editing the dump file to change the column type from money
to numeric in the CREATE TABLE (and edit out all the dollar signs and
commas in the data, too).  Ugh.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: access checking using sql in 7.1beta3
Следующее
От: Josh Goodman
Дата:
Сообщение: SQL queries from within PL/PERL triggers?