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

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

pgsql-hackers by date

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

pgsql-patches by date

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

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