Re: stateful UDF? - Mailing list pgsql-general

From andrew
Subject Re: stateful UDF?
Date
Msg-id 29d3b0b90602150149y3f2d4046n4bc86f4760bea99c@mail.gmail.com
Whole thread Raw
In response to Re: stateful UDF?  (Michael Fuhr <mike@fuhr.org>)
Responses Re: stateful UDF?  (Martijn van Oosterhout <kleptog@svana.org>)
Re: stateful UDF?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Within the same query. The function takes a tuple as its input
parameter. It will be used in the where clause. So I think it will be
called one time for each read tuple, right? I want to maintain a
structure to store the information about the tuples that have been
read so far.  The output value of this function is computed based on
this information and the current input tuple.

On 2/15/06, Michael Fuhr <mike@fuhr.org> wrote:
> On Tue, Feb 14, 2006 at 11:47:49PM +0100, andrew wrote:
> > Can I implement a stateful UDF in C? i.e. storing the state of the
> > previous run of the function and access them in the succeeding runs.
> > Is it supported? How do I implement it? Thanks.
>
> Do you need to maintain state across sessions or just within a
> single session?  What are you trying to do?
>
> --
> Michael Fuhr
>


--
andrew

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Does PG really lack a time zone for India?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: stateful UDF?