Re: [HACKERS] numeric & decimal

From: jwieck(at)debis(dot)com (Jan Wieck)
To: jose(at)sferacarta(dot)com ( José Soares)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] numeric & decimal
Date: 1999-04-27 11:40:47
Message-ID: m10c6EK-000EBgC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Hi all,
>
> I'm trying numeric & decimal types in v6.5beta1 and I have two questions
> about it.
>
> [...]
>
> Second question:
> Why PostgreSQL allows to insert 14 digits into a numeric(5,1) ?
>
> create table test(
> n numeric(10,3),
> d decimal(5,1)
> );

For some reason (dunno why) the parser ignores the precision
for DECIMAL. atttypmod is set hardcoded to -1. So the above
is identical to a

CREATE TABLE test (n numeric(10,3), d decimal);

I'll test what happens if I enable it in gram.y and if it
doesn't break any regression commit the changes.

Jan

--

#======================================================================#
# 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) #

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message JP Rosevear 1999-04-27 13:29:19 Re: [GENERAL] unknown symbol 'lo_unlink'
Previous Message Peter Mount 1999-04-27 11:28:35 RE: [INTERFACES] JDBC and waiting for commit on a locked table in 6.4.2