Re: C Function Memory Management

From: Martin French <Martin(dot)French(at)romaxtech(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-general-owner(at)postgresql(dot)org
Subject: Re: C Function Memory Management
Date: 2012-12-13 07:34:12
Message-ID: OFE02435D2.BCE8078B-ON80257AD3.00298789-80257AD3.0029959F@romaxtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Usually I'd allocate the space in fcinfo->flinfo->fn_mcxt (which is a
> query-lifespan context) and keep a pointer to it in
> fcinfo->flinfo->fn_extra (which is a void * field that a C function
> can do what it pleases with). There are plenty of examples in the
> Postgres source code. If you are looking to cache data longer than
> one query then it takes more thought.
>
> regards, tom lane

Thanks Tom. I'll have a look into this when I have more time.

Kind Regards.

Martin.
=============================================

Romax Technology Limited
Rutherford House
Nottingham Science & Technology Park
Nottingham,
NG7 2PZ
England

Telephone numbers:
+44 (0)115 951 88 00 (main)

For other office locations see:
http://www.romaxtech.com/Contact
=================================
===============
E-mail: info(at)romaxtech(dot)com
Website: www.romaxtech.com
=================================

================
Confidentiality Statement
This transmission is for the addressee only and contains information that
is confidential and privileged.
Unless you are the named addressee, or authorised to receive it on behalf
of the addressee
you may not copy or use it, or disclose it to anyone else.
If you have received this transmission in error please delete from your
system and contact the sender. Thank you for your cooperation.
=================================================

In response to

Browse pgsql-general by date

  From Date Subject
Next Message seiliki 2012-12-13 09:31:04 Trouble with PQnotifies()
Previous Message yinminmin 2012-12-13 01:21:24 Re: Looking for cooperators