From: Ivan Babikov <iab@qms.e-burg.ru>
To: pgsql-sql@postgresql.org
Subject: How to return more than one variable from PgPlSQL procedure?
Date: Fri, 22 Mar 2002 17:34:05 +0500
Message-ID: <a7f882$18v8$1@jupiter.hub.org> (raw)
Hello all,
I've noticed that postgres functions can return SETOF but it seems that
SETOF works only for sql-language functions. At least the code below is
compilable but causes freezing of pgAdmin during the execution. This
function was converted to PgPlSql from Interbase:
***************************************
CREATE FUNCTION "copy_node_sp_data"("int4", "int4") RETURNS SETOF sp_data AS
'
DECLARE INT_ID ALIAS FOR $1;
DECLARE NEW_PARENT ALIAS FOR $2;
DECLARE r RECORD;
BEGIN
Select into r * from SP_DATA where ID=1;
return r;
END;
***************************************
Actually, all I need is to return some integers.
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: iab@qms.e-burg.ru
Subject: Re: How to return more than one variable from PgPlSQL procedure?
In-Reply-To: <a7f882$18v8$1@jupiter.hub.org>
* 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