On 22 Nov 2013, at 21:56, Juan Daniel Santana Rodés
wrote:
> Hi everyone...
> I have a problem. I am programming a recursive function in plpgsql language.
> This function use a cursor and when the function try to call the same
> function throw a exception that it say me that the cursor is usin
Juan Daniel Santana Rodés wrote
> Hi everyone...
> I have a problem. I am programming a recursive function in plpgsql
> language. This function use a cursor and when the function try to call
> the same function throw a exception that it say me that the cursor is
> using.
> My friends how I can to
thanks a lot!
that function does it exactly as wished ;)!
Am 23.03.2011 22:46, schrieb Merlin Moncure:
On Wed, Mar 23, 2011 at 10:29 AM, Sven Haag wrote:
hello pgsql fans out there,
i've already created a function that returns a list of IDs of all sub-samples
based on a given sample ID. th
i guess an array is also ok. must been something like:
fn_get_subsamples(IN sample_numbers[] integer) ??
how would a query then look like?
SELECT * FROM sample WHERE sample_number IN ( fn_get_subsamples(1,2,3,4)
) ??
cheers sven
Am 23.03.2011 17:42, schrieb Tom Lane:
"Sven Haag" writes
On Wed, Mar 23, 2011 at 10:29 AM, Sven Haag wrote:
> hello pgsql fans out there,
>
> i've already created a function that returns a list of IDs of all sub-samples
> based on a given sample ID. this works fine. now i like to extend this
> function so that it can receive a list of sample IDs. e.g.
i guess an array is also ok. must been something like:
fn_get_subsamples(IN sample_numbers[] integer) ??
how would a query then look like?
SELECT * FROM sample WHERE sample_number IN ( fn_get_subsamples(1,2,3,4)
) ??
cheers sven
Am 23.03.2011 17:42, schrieb Tom Lane:
"Sven Haag" write
"Sven Haag" writes:
> hello pgsql fans out there,
> i've already created a function that returns a list of IDs of all sub-samples
> based on a given sample ID. this works fine. now i like to extend this
> function so that it can receive a list of sample IDs. e.g.:
> fn_get_subsamples(IN sample_
Hi,
Thanks Pavel. Here's my working function. Maybe it will save someone
else some time.
CREATE OR REPLACE FUNCTION "Production_Tracking"."GetTopLevelParent"()
RETURNS SETOF record AS
$BODY$
DECLARE
initial_rec RECORD;
rec RECORD;
parentbc varchar;
toplevelparentbc varchar;
BEGIN
FOR in
Hello
please, look on
http://people.planetpostgresql.org/merlin/index.php?/archives/2-Dealing-With-Recursive-Sets-With-PLPGSQL.html
Regards
Pavel Stehule
2007/6/13, Karen Springer <[EMAIL PROTECTED]>:
Hi,
I am struggling to write my first recursive function and think I'm
missing something bas
On Tue, Dec 20, 2005 at 06:58:41PM +0100, Klein Bal?zs wrote:
> In practice however this doesn?t seem to work as the function never returns.
>
> Should this work in theory? Is this the recommended approach?
I can' think of any reason why it wouldn't work; have you tried adding
RAISE statements to
10 matches
Mail list logo