Binary input functions fail to enforce typmod

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Binary input functions fail to enforce typmod
Дата
Msg-id 1645.1121020321@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
Whilst working on the change I proposed to make domain types enforce
their constraints inside the typinput/typreceive routines, I realized
that there's a fairly serious flaw in the design of typreceive routines:
we don't pass them a typmod so they cannot enforce type-specific typmod
restrictions.  This means for example that COPY FROM BINARY could insert
a more-than-four-character string into a char(4) column.

The correct solution of course is to include a typmod value in the
arguments passed to typreceive routines, and to adjust the receive
routines of those datatypes that use typmod to enforce the same
restrictions as the corresponding typinput routines do.

I think this is a "must fix" for 8.1.
        regards, tom lane


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

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: latest pgcrypto patches cause compile errors
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: latest pgcrypto patches cause compile errors