Re: Macros for typtype (was Re: Arrays of Complex Types) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Macros for typtype (was Re: Arrays of Complex Types)
Date
Msg-id 200704010940.10850.peter_e@gmx.net
Whole thread Raw
In response to Re: Macros for typtype (was Re: Arrays of Complex Types)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Macros for typtype (was Re: Arrays of Complex Types)  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Last minute mini-proposal (I know, I know)forPQexecf()
Next
From: Tom Lane
Date:
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)