> NUMERIC and DECIMAL are identical, but should be different
> from INTEGER (what they are in Postgres for now).
> All databases share the definition
> NUMERIC [(precision [, scale] )]
> I'll hack around a little on it to see what's possible for
Easy - and the type coersion stuff helps alot!
Up to now (1.5 hours hacking) I have a NUMERIC type that
handles '+' completely, including overflow checks and
Subtract will be trivial, because the core funcitons already
exist for the add. Multiply and divide will take some time
and then there are all the comparision operators, an operator
class and all the type conversion (int<->numeric,
Another tricky part I expect when telling the parser that a
literal NUMERIC must not be enclosed into single quotes.
The only ugly thing is, that I needed to put the precision
AND the scale together into atttypmod (I limited both to 99
for now and put them as prec<<8 | scale into). So pg_dump
will need attention later.
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 1998-12-19 01:39:10|
|Subject: Re: [HACKERS] Upgrades for 6.4.1|
|Previous:||From: Clark Evans||Date: 1998-12-19 00:41:41|
|Subject: Help with Documentation?|