From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Teodor Macicas <teodor(dot)macicas(at)epfl(dot)ch> |
Cc: | Luca Ferrari <fluca1978(at)infinito(dot)it>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: what is the meaning of Datum? |
Date: | 2010-06-23 18:08:26 |
Message-ID: | 25330.1277316506@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Teodor Macicas <teodor(dot)macicas(at)epfl(dot)ch> writes:
> Tom Lane wrote:
>> C code will work with a value in a "native" representation, and then
>> convert to or from Datum in order to pass the value through
>> data-type-independent interfaces.
> And how this convertions will be made ?
> Are there internal functions to do this ?
Usually you should use the appropriate DatumGetXXX or XXXGetDatum
macro, or possibly the PG_GET_XXX or PG_RETURN_XXX wrappers for those.
Whether that's a simple cast or a function call is the macro's business.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-06-23 18:31:02 | Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE |
Previous Message | Scott Marlowe | 2010-06-23 17:19:50 | Re: what happens to postmaster? |