Re: Recursive function that receives a list of IDs and returns all child IDs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sven Haag" <sven-haag(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Recursive function that receives a list of IDs and returns all child IDs
Date: 2011-03-23 16:42:42
Message-ID: 29267.1300898562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Sven Haag" <sven-haag(at)gmx(dot)de> 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_numbers SETOF integer)

There's no such animal as a function that accepts a set. You could pass
it an array of integers instead. Or maybe just call it more than once.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Chambers 2011-03-23 16:43:44 Dynamic Assignment
Previous Message Adrian Schreyer 2011-03-23 15:33:59 Re: Weird problems with C extension and bytea as input type