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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
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 07:50:07
Message-ID: 8909.1175413807@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-04-01 08:15:29 Re: Macros for typtype (was Re: Arrays of Complex Types)
Previous Message Peter Eisentraut 2007-04-01 07:40:09 Re: Macros for typtype (was Re: Arrays of Complex Types)

Browse pgsql-patches by date

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