Re: Macros for typtype (was Re: Arrays of Complex Types)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Macros for typtype (was Re: Arrays of Complex Types)
Дата
Msg-id 8909.1175413807@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Macros for typtype (was Re: Arrays of Complex Types)  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Macros for typtype (was Re: Arrays of Complex Types)  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> I'm not sure we could rely on the behavior if we declared
>> pg_type.typtype as an enum type ... and if we don't, there's not
>> much point.

> I was thinking C enums:

> enum typtype_type {
>     TYPTYPE_BASE = 'b',
>     TYPTYPE_COMPOSITE = 'c',
>     TYPTYPE_DOMAIN = 'd',
>     TYPTYPE_ENUM = 'e',
>     TYPTYPE_PSEUDO = 'p'
> };

> I'm not sure if this is better.

What bothers me about that is I don't think the C spec mandates the
representation width.  If we could guarantee that enum typtype_type
was 1 byte I'd be all for it.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Macros for typtype (was Re: Arrays of Complex Types)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Macros for typtype (was Re: Arrays of Complex Types)