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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Smith 2007-04-01 22:16:28 Re: bgwriter stats
Previous Message Tom Lane 2007-04-01 18:42:52 Re: Current enums patch