Re: Fixed length data types issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fixed length data types issue
Дата
Msg-id 24757.1157468561@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fixed length data types issue  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> So I'm thinking again about the problems with fixed length data types not
> having typmod available when they would need it. But I'm having trouble
> finding enough old posts to get a handle on exactly what the problem is.

The problem is it isn't available ;-)

AFAIR the only context where datatype-specific functions *do* get passed
typmod is in the invocation of a datatype input function or length
coercion function.  And in those contexts the semantics are really
"convert the input to match this typmod", not "this typmod describes
what you've been passed".

The basic rule here is that you have to be able to find out everything
you need to know about a given instance of a datatype just by looking at
the Datum.  If you try to rely on external data then you have the same
security problems that we had to redesign output functions to get rid
of: there's not sufficient guarantee that the external data actually
matches the datum.
        regards, tom lane


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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: integration of pgcluster into postgresql
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Open items for 8.2