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

From Bruce Momjian
Subject Re: Macros for typtype (was Re: Arrays of Complex Types)
Date
Msg-id 200703312313.l2VNDKk07650@momjian.us
Whole thread Raw
In response to 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)  (David Fetter <david@fetter.org>)
Re: Macros for typtype (was Re: Arrays of Complex Types)  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Tom Lane wrote:
> I wrote:
> > David Fetter <david@fetter.org> writes:
> >> What parts of the code would need a once-over?  
> 
> > A lot :-( ... probably every place that touches typtype or typelem would
> > need at least a look.  It'd be a good idea to take the opportunity to
> > start using macros for the values of typtype, as we do for relkind but
> > for some reason never adopted for typtype.
> 
> I just realized that I need to check every usage of typtype to be sure
> that the enums patch is sane.  So, barring objection, I intend to take
> this opportunity to make the code stop referring directly to 'b', 'c'
> etc whereever possible.  Any objections to these names?
> 
> #define    TYPTYPE_BASE        'b'
> #define    TYPTYPE_COMPOSITE    'c'
> #define    TYPTYPE_DOMAIN        'd'
> #define    TYPTYPE_ENUM        'e'
> #define    TYPTYPE_PSEUDO        'p'

I like macros.  ;-)

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Last minute mini-proposal (I know, I know)forPQexecf()
Next
From: Bruce Momjian
Date:
Subject: Re: Last minute mini-proposal (I know, I know)forPQexecf()