Hi,
Also you could take a look at the connectby function as this will do what
you want with ease and it can be used to sort stuff at the same time,
produce tree views of data etc.
Nick
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Gnanavel Shanmugam
S
solved the problem. The modified function is
CREATE or replace FUNCTION get_child_section_types(int) RETURNS setof int
AS $$
declare
v_section_type_id alias for $1;
v_rec record;
v_rec1 record;
begi
Sent: Monday, August 19, 2002 11:22 PM
Subject: Re: [SQL] recursive function returning "setof"
>
> Thanx Chris,
>
> but I can't find it.
> My Programmer's Guide (.../pgsql/doc/html/xfunc-sql.html) says
>
>"12.2. Query Language (SQL) Functions
>
Thanx Chris,
but I can't find it.
My Programmer's Guide (.../pgsql/doc/html/xfunc-sql.html) says
"12.2. Query Language (SQL) Functions
SQL functions execute an arbitrary list of SQL statements,"
Nothing about control structures in SQL functions additional to the normal
command-line syn
> The problem is:
> A SQL-Function cannot be recursive because it cannot call itself, and it
can
> perform no loops.
> A PLPGSQL-Function cannot return sets.
It can perform loops. Check the manual- you can do FOR and WHILE loops.
7.3 will be able to return sets from PLPGSQL funcs it seems.
Chri