Re: [HACKERS] numeric & decimal
От | jwieck@debis.com (Jan Wieck) |
---|---|
Тема | Re: [HACKERS] numeric & decimal |
Дата | |
Msg-id | m10c6EK-000EBgC@orion.SAPserv.Hamburg.dsh.de обсуждение исходный текст |
Ответы |
Re: [HACKERS] numeric & decimal
Re: [HACKERS] numeric & decimal |
Список | 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@debis.com (Jan Wieck) #
В списке pgsql-hackers по дате отправления: