Re: [HACKERS] Upgrades for 6.4.1

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: [HACKERS] Upgrades for 6.4.1
Дата
Msg-id 367B1658.6B3BD9@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: [HACKERS] Upgrades for 6.4.1  (jwieck@debis.com (Jan Wieck))
Ответы Re: [HACKERS] Upgrades for 6.4.1  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-hackers
>     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.

Neat. I was poking around waiting on a freeware extended-precision
numerical package, but hadn't found anything with a BSD-style license.

>     Another  tricky  part I expect when telling the parser that a
>     literal NUMERIC must not be enclosed into single quotes.

This is probably the worst part, since you would hate to take the hit
representing everything as extended precision even if the actual range
is int4/float8. Perhaps we can read as those, but if we get a failure
then escalate to your extended precision type(s). The automatic type
conversion stuff should convert later if necessary, so it might be
transparent and relatively fast.

>     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.

As Bruce points out, that was anticipated (but I agree it's ugly). Shift
over 16 bits if you want...

Congrats!
                       - Tom


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] Help with Documentation?
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] 6.4.1 fails to compile