Re: persistent variables between cross-calls in C functions

From: "ff" <ff-(at)uol(dot)com(dot)br>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: persistent variables between cross-calls in C functions
Date: 2003-03-23 20:14:24
Message-ID: HC7XK0$IpmTQkrh7wunKLlFj4uXas7y7I_R@uol.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

> "ff" <ff-(at)uol(dot)com(dot)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 p
rovide
> communications across sessions. For that you'd need to use
a file or
> grab some shared memory (this is doable but bear in mind tha
t it's a
> very finite resource).
>
> regards, tom lane
>
>

Thanks, Tom!
But it isn't working.
Even inside the same session (I do not want to provide
communications across sessions).

Is there any macro provided in any c header file that I
should use?

I am using postgresql version 7.3.2, on AIX 4.3 (and all
patches).

Thanks again.

---
UOL, o melhor da Internet
http://www.uol.com.br/

Browse pgsql-interfaces by date

  From Date Subject
Next Message Pavel Eremenko 2003-03-24 06:56:50 invalid large obj descriptor(0)
Previous Message William West 2003-03-22 21:40:39 Interaction between Cursor and Transaction storage?