From: Tom Lane <tgl@sss.pgh.pa.us>
To: ff <ff-@uol.com.br>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: persistent variables between cross-calls in C functions
Date: Sat, 22 Mar 2003 00:20:21 -0500
Message-ID: <27885.1048310421@sss.pgh.pa.us> (raw)
In-Reply-To: <HC479L$IV_LImy4TIWPigNNbAWviUDKTgWo@uol.com.br>
References: <HC479L$IV_LImy4TIWPigNNbAWviUDKTgWo@uol.com.br>
"ff" <ff-@uol.com.br> writes:
> I could not find any way to store a value in a C function
> between calls.
A static variable such as you illustrated should work fine --- at least
for successive calls within a single session. It will not provide
communications across sessions. For that you'd need to use a file or
grab some shared memory (this is doable but bear in mind that it's a
very finite resource).
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, ff-@uol.com.br
Subject: Re: persistent variables between cross-calls in C functions
In-Reply-To: <27885.1048310421@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox