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 07:40:09
Message-ID: 200704010940.10850.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-04-01 07:50:07 Re: Macros for typtype (was Re: Arrays of Complex Types)
Previous Message Greg Smith 2007-04-01 07:27:46 Logging checkpoints and other slowdown causes

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-04-01 07:50:07 Re: Macros for typtype (was Re: Arrays of Complex Types)
Previous Message Greg Smith 2007-04-01 07:27:46 Logging checkpoints and other slowdown causes