| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
| Cc: | Teodor Sigaev <teodor(at)sigaev(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: src/backend/parser/parse_expr.c:exprTypmod() question |
| Date: | 2006-10-03 15:48:22 |
| Message-ID: | 26252.1159890502@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
>> I'm working on user-defined typmod and try to move all typmod calculations into
>> type-specific functions. But there is a strange place:
> Note that unlike most of the built-in types bpchar doesn't actually make much
> sense without a typmod.
You may be reading too much into it. Looking at the patch that
introduced exprTypmod(), I think I may have just been interested
in avoiding an unnecessary length-coercion function call when assigning
a constant that was already of the correct length to a CHAR(N) column.
I concur with Teodor that embedding this type-specific knowledge into
exprTypmod probably isn't all that great an idea.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-10-03 15:51:12 | Re: src/tools/msvc usage instructions |
| Previous Message | Tom Lane | 2006-10-03 15:33:02 | Re: timestamptz alias |