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