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