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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>, David Fetter <david(at)fetter(dot)org>
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)
Date: 2007-04-01 08:15:29
Message-ID: 200704011015.30442.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-04-01 09:36:39 Re: Macros for typtype (was Re: Arrays of Complex Types)
Previous Message Tom Lane 2007-04-01 07:50:07 Re: Macros for typtype (was Re: Arrays of Complex Types)

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Stark 2007-04-01 09:36:39 Re: Macros for typtype (was Re: Arrays of Complex Types)
Previous Message Greg Smith 2007-04-01 07:57:35 Re: bgwriter stats