From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Jack Orenstein <jack(dot)orenstein(at)gmail(dot)com> |
Cc: | Andrew - Supernews <andrew(at)supernews(dot)net>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Initializing Datums for use with SPI_execute_plan |
Date: | 2006-09-19 19:34:27 |
Message-ID: | 20060919193427.GE1789@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Sep 19, 2006 at 01:27:56PM -0400, Jack Orenstein wrote:
> On 9/18/06, Jack Orenstein <jack(dot)orenstein(at)gmail(dot)com> wrote:
> >---------- Forwarded message ----------
> >From: Andrew - Supernews <andrew(at)supernews(dot)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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Jack Orenstein | 2006-09-19 20:00:43 | Re: Initializing Datums for use with SPI_execute_plan |
Previous Message | Joshua D. Drake | 2006-09-19 18:55:45 | Re: Load a csv file into a pgsql table |