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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Macros for typtype (was Re: Arrays of Complex Types)
Дата
Msg-id 200704010940.10850.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: Macros for typtype (was Re: Arrays of Complex Types)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Macros for typtype (was Re: Arrays of Complex Types)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> > Why not enums? ;-)
>
> Well, macros is how we do it elsewhere for "char" system columns.
> 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.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Last minute mini-proposal (I know, I know)forPQexecf()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Macros for typtype (was Re: Arrays of Complex Types)