Re: understanding Datum -> char * -> Datum conversions

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: ldm(at)apartia(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: understanding Datum -> char * -> Datum conversions
Date: 2000-05-25 10:51:52
Message-ID: Pine.LNX.3.96.1000525124817.31465H-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-05-25 10:59:44 AW: Berkeley DB...
Previous Message Louis-David Mitterrand 2000-05-25 10:44:40 Re: understanding Datum -> char * -> Datum conversions