Re: type info refactoring - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: type info refactoring
Date
Msg-id 1288562471.5712.15.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: type info refactoring  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List 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.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: type info refactoring
Next
From: Robert Haas
Date:
Subject: Re: ALTER OBJECT any_name SET SCHEMA name