Search Postgresql Archives

Re: Initializing Datums for use with SPI_execute_plan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 19, 2006 at 01:27:56PM -0400, Jack Orenstein wrote:
> On 9/18/06, Jack Orenstein <jack.orenstein@xxxxxxxxx> wrote:
> >---------- Forwarded message ----------
> >From: Andrew - Supernews <andrew@xxxxxxxxxxxxx>
> ...
> > 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@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux