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 200704011015.30442.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)  (Gregory Stark <stark@enterprisedb.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)
Next
From: Gregory Stark
Date:
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)