Re: User-defined typle similar to char(length) varchar(length)

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: User-defined typle similar to char(length) varchar(length)
Дата
Msg-id 44D34D9B.9050401@sigaev.ru
обсуждение исходный текст
Ответ на Re: User-defined typle similar to char(length) varchar(length)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: User-defined typle similar to char(length) varchar(length)
Список pgsql-hackers
>> But that makes NUMERIC(x,y) impossible to represent.

> Well, we have to special-case INTERVAL anyway (because its cramming some
> truly bizarre things into typmod), and it wouldn't bother me too much to
> special-case NUMERIC as well.

We have a lot of special transformation of type based on typmod (char, bit, 
float), a lot of additional keywords ("national", "varying" etc), a lot of 
hardcoded synonyms (real->float4 etc). BPchar typemod stores value with added 
VARHRDSZ. Sorry, I don't see regular way to support those exceptions even with 
typmod_in/typemod_out functions per type...

User defined type can check typmod option in its input or cast function, I don't 
think that will be very expensive.

> one value and you enter two or vice versa.  NUMERIC can finesse this
> because the default for scale is zero, but in the general case that
> wouldn't work so well.
I agree.

Is there a chance to commit this patch to 8.2?

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


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

Предыдущее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: 8.2 features status
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: standard interfaces for replication providers