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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Macros for typtype (was Re: Arrays of Complex Types)
Дата
Msg-id 200704011015.30442.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)  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Tom Lane wrote:
> 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.

The width is 4 both for the macro and the enum case.  Both

#define TYPTYPE_BASE 'b'

and

enum ... {TYPTYPE_BASE = 'b',

effectively generate int constants named TYPTYPE_BASE with decimal value 
98.  So there are no storage advantages either way.

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


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

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