Re: understanding Datum -> char * -> Datum conversions - Mailing list pgsql-hackers

From Karel Zak
Subject Re: understanding Datum -> char * -> Datum conversions
Date
Msg-id Pine.LNX.3.96.1000525124817.31465H-100000@ara.zf.jcu.cz
Whole thread Raw
In response to Re: understanding Datum -> char * -> Datum conversions  (Louis-David Mitterrand <cunctator@apartia.ch>)
Responses Re: understanding Datum -> char * -> Datum conversions  (Louis-David Mitterrand <cunctator@apartia.ch>)
List pgsql-hackers
> >  See in PG's backend source files:
> > 
> >     c.h         - for datetype definition and Datum macros,
> >               we have Datum macros for double/float types too.
> >               
> >     buildin.h     - for datetype conversion.
> >     utils/timestamp.h   ...etc.
> > 
> >  and directory  utils/adt for inspiration "how work
> > with pg types :-)
> 
> I'm reading these files but still got a problem:

float32  result = (float32) palloc(sizeof(float32data));    *result = 10.5;SPI_modifytuple(relation, tupdesc, &attnum,
Float32GetDatum(result),                           NULL);
 

Right?
                Karel



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: AW: AW: SQL3 UNDER
Next
From: Hannu Krosing
Date:
Subject: Re: AW: Berkeley DB...