X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A7A9F476374 for ; Sat, 22 Mar 2003 00:20:17 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 39AA8476389 for ; Sat, 22 Mar 2003 00:20:17 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2M5KMub027886; Sat, 22 Mar 2003 00:20:22 -0500 (EST) To: "ff" Cc: pgsql-interfaces@postgresql.org Subject: Re: persistent variables between cross-calls in C functions In-reply-to: References: Comments: In-reply-to "ff" message dated "Fri, 21 Mar 2003 16:53:45 -0300" Date: Sat, 22 Mar 2003 00:20:21 -0500 Message-ID: <27885.1048310421@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-22.9 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50-cvs X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50-cvs (1.172-2003-02-14-exp) X-Archive-Number: 200303/132 X-Sequence-Number: 3881 "ff" 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