From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: User-defined typle similar to char(length) varchar(length) |
Date: | 2006-08-04 13:37:31 |
Message-ID: | 44D34D9B.9050401@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Jonah H. Harris | 2006-08-04 13:37:32 | Re: 8.2 features status |
Previous Message | Andrew Dunstan | 2006-08-04 13:30:49 | Re: 8.2 features status |