From: Fritz Lehmann-Grube <lehmannf@math.TU-Berlin.DE>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: recursive function returning "setof"
Date: Mon, 19 Aug 2002 17:22:02 +0200
Message-ID: <3D610D1A.6020009@math.tu-berlin.de> (raw)
References: <3D60F041.10003@math.tu-berlin.de>
<006b01c24790$072149c0$0200a8c0@SOL>
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 syntax. Where can I find it ?
and (.../pgsql/doc/html/plpgsql.html#PLPGSQL-ADVANTAGES)
"23.1.1.1. Better Performance
SQL is the language PostgreSQL (and most other Relational Databases) use as
query language. It's portable and easy to learn. But every SQL statement
must be executed individually by the database server.
That means that your client application must send each query to the database
server, wait for it to process it, receive the results, do some computation,
then send other queries to the server."
Isn't it just the thing in plpgsql to add control structures to SQL ?
Fritz
Christopher Kings-Lynne wrote:
>>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.
>
> Chris
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lehmannf@math.TU-Berlin.DE, chriskl@familyhealth.com.au
Subject: Re: recursive function returning "setof"
In-Reply-To: <3D610D1A.6020009@math.tu-berlin.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox