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

From Brook Milligan
Subject Re: understanding Datum -> char * -> Datum conversions
Date
Msg-id 200005242229.QAA25974@biology.nmsu.edu
Whole thread Raw
In response to Re: understanding Datum -> char * -> Datum conversions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: understanding Datum -> char * -> Datum conversions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Casting doesn't do it.  Use text_out() to produce a null-terminated C  string from a text Datum, and use text_in()
tocreate a new text Datum  after you've modified the string.
 

By the way, I know there are a bunch of macros for tranforming to and
from Datum, but whenever I use them I have to figure out again exactly
how to do it.

Is there some documentation on the set of macros and what they do (or
some other means of describing how one translates arguments and return
values between internal form and "useful" programming form)?

Thanks for your help.

Cheers,
Brook


pgsql-hackers by date:

Previous
From: gomathi raju
Date:
Subject:
Next
From: Tom Lane
Date:
Subject: Re: understanding Datum -> char * -> Datum conversions