Re: Recursive call indicator/counter - Mailing list pgsql-general

From elein
Subject Re: Recursive call indicator/counter
Date
Msg-id 200211092119.gA9LJMoP581018@pimout2-ext.prodigy.net
Whole thread Raw
In response to Recursive call indicator/counter  (Hadley Willan <hadley.willan@deeper.co.nz>)
List pgsql-general
You can also write the function in plpython.  Plpython
has the concept of a statement duration data dictionary.
Since the calls are recursive they should all be in the same
SQL statement duration.  This is also a very handy way
to write running sums, etc.

elein@norcov.com

On Thursday 07 November 2002 18:38, Hadley Willan wrote:
> Gudday' all.
>
>      In plpgsql, I've written a function that can call itself if
> necessary and thus recurse down to the bottom of a tree, operate on
> bottom node, then as it comes out, operate on each node, until
> eventually it gets to the top again.
>
> However, is there any system variable that I can check to see if this
> function has just been called for the first time or if this is the nTH
> call from itself?
>
> Thanks.

pgsql-general by date:

Previous
From: elein
Date:
Subject: Re: Column based on pg-general
Next
From: Tom Lane
Date:
Subject: Re: Win2K Questions