Re: Re: [HACKERS] Re: [HACKERS] Is it necessary to rewrite table while increasing the scale of datatype numeric?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [HACKERS] Re: [HACKERS] Is it necessary to rewrite table while increasing the scale of datatype numeric?
Дата
Msg-id 4164.1378496991@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [HACKERS] Is it necessary to rewrite table while increasing the scale of datatype numeric?  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> But I wonder if we could just declare that that's not what the scale typmod
> does. That it's just a maximum scale but it's perfectly valid for NUMERIC
> data with lower scales to be stored in a column than the typmod says. In a
> way the current behaviour is like bpchar but it would be nice if it was
> more like varchar

BTW, note that if you want varying scale in a column, you can declare it
as unconstrained "numeric".  So that case corresponds to "text", whereas
as you rightly say, numeric(m,n) is more like bpchar(n).  It's true there
is nothing corresponding to varchar(n), but how much do you really need
that case?  The SQL standard didn't see fit to invent a variant of numeric
that worked that way, so they at least aren't buying it.

            regards, tom lane



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: dynamic shared memory
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: [RFC] Extend namespace of valid guc names