Re: [HACKERS] numeric & decimal
От | jwieck@debis.com (Jan Wieck) |
---|---|
Тема | Re: [HACKERS] numeric & decimal |
Дата | |
Msg-id | m10gtGg-000EBXC@orion.SAPserv.Hamburg.dsh.de обсуждение исходный текст |
Ответ на | Re: [HACKERS] numeric & decimal (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] numeric & decimal
|
Список | pgsql-hackers |
Bruce Momjian wrote: > > > This looks like something that should be addressed. Was it? > > > > > > 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. This one is fixed. Parser handles precision of DECIMAL already. > > NUMERIC without size is interpreted as NUMERIC(x,6). Why ? > > Standard SQL92 says that NUMERIC without size is equivalent to NUMERIC(1) PostgreSQL specific. Should I change it to standard? > > > > - NUMERIC(4,1) transalte value -999.99 as -1000.0 (greater than his size) Definitely a bug. The value is checked before the rounding. Will fix it soon. 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 по дате отправления: