Re: length coerce for bpchar is broken since 7.0

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: length coerce for bpchar is broken since 7.0
Дата
Msg-id 907.971795114@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: length coerce for bpchar is broken since 7.0  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Ответы Re: length coerce for bpchar is broken since 7.0  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> I'm going to fix the problem by changing bpcharin() rather than
> changing exprTypmod(). Surely we could fix the problem by changing
> exprTypmod() for INSERT, however, we could not fix the similar problem
> for COPY FROM in the same way.  Changing bpcharin() would solve
> problems of both INSERT and COPY FROM. So bpcharin() seems more
> appropreate place to fix both problems.

bpcharin() will most definitely NOT fix the problem, because it often
will not know the target column's typmod, if indeed there is an
identifiable target column at all.  I agree that it's a good solution
for COPY FROM, but you need to fix exprTypmod() too.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: "initdb -t" destroys all databases
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: incompatible changes of PQsetdbLogin()