Re: type info refactoring

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: type info refactoring
Date: 2010-10-31 22:01:11
Message-ID: 1288562471.5712.15.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On sön, 2010-10-31 at 18:50 +0200, Heikki Linnakangas wrote:
> Yeah, that was my first impression too. I assumed that TypeInfo would be
> embedded in other structs directly, rather than a pointer and palloc.
> Something like:
>
> /*
> * TypeInfo - encapsulates type information
> */
> typedef struct TypeInfo
> {
> Oid typeid;
> int32 typmod;
> } TypeInfo;
> ...
> typedef struct Const
> {
> Expr xpr;
> - Oid consttype; /* pg_type OID
> of the constant's datatype */
> - int32 consttypmod; /* typmod value, if any */
> + TypeInfo consttype; /* type information of the
> constant's datatype */
> int constlen; /* typlen of
> the constant's datatype */
> Datum constvalue; /* the constant's value */

That's another possibility, but you can't stick TypeInfo into a list
that way.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-31 22:02:55 Re: ALTER OBJECT any_name SET SCHEMA name
Previous Message Peter Eisentraut 2010-10-31 21:58:53 Re: type info refactoring