Re: Initializing Datums for use with SPI_execute_plan

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Initializing Datums for use with SPI_execute_plan
Дата
Msg-id 20060919193427.GE1789@svana.org
обсуждение исходный текст
Ответ на Re: Initializing Datums for use with SPI_execute_plan  ("Jack Orenstein" <jack.orenstein@gmail.com>)
Ответы Re: Initializing Datums for use with SPI_execute_plan  ("Jack Orenstein" <jack.orenstein@gmail.com>)
Список pgsql-general
On Tue, Sep 19, 2006 at 01:27:56PM -0400, Jack Orenstein wrote:
> On 9/18/06, Jack Orenstein <jack.orenstein@gmail.com> wrote:
> >---------- Forwarded message ----------
> >From: Andrew - Supernews <andrew@supernews.net>
> ...
> > Jack> I have an int8 that I need as a Datum for use with
> > Jack> SPI_execute_plan.
> >
> >Int64GetDatum(your_variable)
>
> which then has to be pfree'd, correct?

Possibly, it probably depends on the architechture. The memory is being
allocated in a per-call context IIRC so it'll be freed at the end of
the function anyway. I wouldn't worry about it.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Load a csv file into a pgsql table
Следующее
От: "Jack Orenstein"
Дата:
Сообщение: Re: Initializing Datums for use with SPI_execute_plan