Re: [HACKERS] Upgrades for 6.4.1
От | jwieck@debis.com (Jan Wieck) |
---|---|
Тема | Re: [HACKERS] Upgrades for 6.4.1 |
Дата | |
Msg-id | m0zrAlg-000EBPC@orion.SAPserv.Hamburg.dsh.de обсуждение исходный текст |
Ответ на | Re: [HACKERS] Upgrades for 6.4.1 (jwieck@debis.com (Jan Wieck)) |
Ответы |
Re: [HACKERS] Upgrades for 6.4.1
|
Список | pgsql-hackers |
I wrote: > 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 > us. 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 rounding. 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, float<->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. 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 по дате отправления: