Re: numeric cast oddity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: numeric cast oddity
Дата
Msg-id 9802.1259856242@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: numeric cast oddity  (Scott Marlowe <scott.marlowe@gmail.com>)
Ответы Re: numeric cast oddity  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Scott Marlowe <scott.marlowe@gmail.com> writes:
> On Thu, Dec 3, 2009 at 8:03 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Really? �Your example doesn't seem to show that.

> I think he's talking about the headers

The headers I get are

regression=# select -1::numeric(20,4);
 ?column?
----------
  -1.0000
(1 row)

regression=# select cast(-1 as numeric(20,4));
 numeric
---------
 -1.0000
(1 row)

which are indeed different (might be worth looking into why) but
don't seem to have anything to do with scale/precision.

            regards, tom lane

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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Catastrophic changes to PostgreSQL 8.4
Следующее
От: Tom Lane
Дата:
Сообщение: Re: numeric cast oddity