understanding Datum -> char * -> Datum conversions

Поиск
Список
Период
Сортировка
От Louis-David Mitterrand
Тема understanding Datum -> char * -> Datum conversions
Дата
Msg-id 20000524182641.A6621@styx
обсуждение исходный текст
Ответы Re: understanding Datum -> char * -> Datum conversions  (Karel Zak <zakkr@zf.jcu.cz>)
Re: understanding Datum -> char * -> Datum conversions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello,

I am learning to programm triggers in C by using the examples and the
programmer's manual but it's a steep learning curve for a mere perl
programmer ;-)

What I am trying to do for instance is:
- read a ::text colum with SPI_getbinval(),
- convert it to a char*,
- modify it,
- convert it back to a Datum,
- reinsert it into the tuple through SPI_modifytuple,

The conversions involve some pointer magic and casting that I really
don't grasp.

Also I am trying to read a timestamp with SPI_getbinval and get the
number of seconds contained. Using DatumGetInt32 doens't seem to do it.

Thanks in advance for your insight, cheers,

-- 
Louis-David Mitterrand - ldm@apartia.org - http://www.apartia.fr

Radioactive cats have 18 half-lives.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Benjamin Adida
Дата:
Сообщение: Re: Re: interactive pgsql book
Следующее
От: "Poul L. Christiansen"
Дата:
Сообщение: Re: Re: interactive pgsql book