Re: what is the meaning of Datum?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: what is the meaning of Datum?
Дата
Msg-id 25330.1277316506@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: what is the meaning of Datum?  (Teodor Macicas <teodor.macicas@epfl.ch>)
Список pgsql-general
Teodor Macicas <teodor.macicas@epfl.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

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: what happens to postmaster?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE