Re: Auto selection of internal representation for integer NUMERIC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Auto selection of internal representation for integer NUMERIC
Date: 2006-07-03 15:35:16
Message-ID: 3394.1151940916@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> In particular, this is useful for oracle users. Oracle recommends to use
> NUMBER(n, p) for all the case where numerics are required. So they try to
> use NUMERIC on PostgreSQL instead of NUMBER. But NUMERIC is not the best
> alternative to a short integer NUMBER.

I think the correct answer to that is user education. Anything along
the lines you are suggesting would be convoluted and would probably
introduce unexpected behaviors (eg, overflow of intermediate results
that wouldn't have overflowed if the data was really NUMERIC).

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-07-03 16:44:08 Re: Transaction and table partitioning
Previous Message Marc G. Fournier 2006-07-03 15:24:49 Re: CVS mirror, was Re: [PATCHES] ADD/DROPS INHERIT (actually INHERIT