Re: src/backend/parser/parse_expr.c:exprTypmod() question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: src/backend/parser/parse_expr.c:exprTypmod() question
Дата
Msg-id 26252.1159890502@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: src/backend/parser/parse_expr.c:exprTypmod() question  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Teodor Sigaev <teodor@sigaev.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


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: timestamptz alias
Следующее
От: Tom Lane
Дата:
Сообщение: Re: src/tools/msvc usage instructions