Re: numeric cast oddity

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Sim Zacks <sim(at)compulab(dot)co(dot)il>, pgsql-general(at)postgresql(dot)org, Sandy Oz <alexandra(at)compulab(dot)co(dot)il>
Subject: Re: numeric cast oddity
Date: 2009-12-03 16:04:02
Message-ID: 9802.1259856242@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> writes:
> On Thu, Dec 3, 2009 at 8:03 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank Sweetser 2009-12-03 16:16:57 Re: [Bacula-users] Catastrophic changes to PostgreSQL 8.4
Previous Message Sam Mason 2009-12-03 16:03:32 Re: Catastrophic changes to PostgreSQL 8.4