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: Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)
Date: 2007-04-01 20:18:57
Message-ID: 200704012218.58449.peter_e@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> It seems clear to me that this authorizes, but *does not require*,
> the compiler to store an enum field in a byte or short instead of
> an int when all the declared values will fit.  So if we tried to
> do this, we'd have the problem of needing compiler-specific data
> type information entered in pg_type.

FWIW, I never meant to suggest using enums tuple structures.  I did, 
however, stumble over a case that appears to be handled similar to what 
I had in mind: see enum CoercionCodes in primnodes.h.  Again, it's not 
really important, but it's interesting to see that there is precedent.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2007-04-01 21:29:32
Subject: Implicit casts to text
Previous:From: korrydDate: 2007-04-01 19:56:27
Subject: Re: Last minute mini-proposal (I know, Iknow)forPQexecf()

pgsql-patches by date

Next:From: Greg SmithDate: 2007-04-01 22:16:28
Subject: Re: bgwriter stats
Previous:From: Tom LaneDate: 2007-04-01 18:42:52
Subject: Re: Current enums patch

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