Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group