Re: understanding Datum -> char * -> Datum conversions
От | Louis-David Mitterrand |
---|---|
Тема | Re: understanding Datum -> char * -> Datum conversions |
Дата | |
Msg-id | 20000525132519.A11355@styx обсуждение исходный текст |
Ответ на | Re: understanding Datum -> char * -> Datum conversions (Karel Zak <zakkr@zf.jcu.cz>) |
Ответы |
pfree() after palloc() in trigger (was: Re: understanding Datum -> char * -> Datum conversions)
Re: understanding Datum -> char * -> Datum conversions |
Список | pgsql-hackers |
On Thu, May 25, 2000 at 12:51:52PM +0200, Karel Zak wrote: > > > > 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? Yes! It works now. My error was using a float32 instead of a float64, as the internal type is really a float8. The confusion comes from defining my tables with the type "float" which apparently defaults to float8. Many thanks, -- Louis-David Mitterrand - ldm@apartia.org - http://www.apartia.fr "2c98611832ea3f6f5fdda95d3704fbb8" (a truly random sig)
В списке pgsql-hackers по дате отправления: