Re: On hardcoded type aliases and typmod for user types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: On hardcoded type aliases and typmod for user types
Дата
Msg-id 11832.1125579027@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: On hardcoded type aliases and typmod for user types  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: On hardcoded type aliases and typmod for user types  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
>    TYPMODFUNC =3D function( internal [, sometype ] ) RETURNS int32 or intar=
> ray

> Simply pass the (Node*) from the parser and let the function sort it
> out itself. Except now they have to be written in C. Is this
> unreasonable,

Nope.  You're not going to be writing any interesting datatypes without
using C, anyway.  I'd go with this one to minimize flexibility problems.

I'd be inclined to stick with the convention that internally typmod is
a single int32; that is really wired into way too many APIs to consider
changing.  varchar could do something like using 24 bits for the length
and 8 bits for an encoded indication of the charset.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Pre-allocated free space for row
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TODO item: set proper permissions on non-system schemas