Bill Studenmund writes:
> > create function produce(text) returns text as '
> > GD["key"] = args[0]
> > ' language plpython;
> >
> > create function consume() returns text as '
> > return GD["key"]
> > ' language plpython;
> >
> > There is also a dictionary for private data.
>
> Private to what?
Private to the procedure, but saved across calls (during one session).
> Oh, by shared memory, do you mean SYSV Shared Memory (like how the
> backends talk) or just memory shared between routines? I ask as part of
> the idea with these variables is that they are backend-specific. So C
> routines actually should NOT used SYSV Shared Mem. :-)
Yes, you're right. Actually, sharing data across PostgreSQL C functions
is trivial because you can just use global variables in your dlopen
modules.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter