From: Kristo Kaiv <kristo.kaiv@skype.net>
To: Albe Laurenz <all@adv.magwien.gv.at>
To: pgsql-sql@postgresql.org
Subject: Re: [GENERAL] table column vs. out param [1:0]
Date: Mon, 27 Aug 2007 10:52:38 +0300
Message-ID: <6E81C495-5225-4199-BFCB-9EE5FEB1CEF3@skype.net> (raw)
In-Reply-To: <D960CB61B694CF459DCFB4B0128514C218D7D7@exadv11.host.magwien.gv.at>
References: <5177DE35-7DAD-4DAF-B314-242DAA2B15D1@skype.net>
<D960CB61B694CF459DCFB4B0128514C218D7D7@exadv11.host.magwien.gv.at>
On 23.08.2007, at 11:55, Albe Laurenz wrote:
> CREATE FUNCTION b(status OUT integer, status_text OUT text)
> LANGUAGE plpgsql STABLE STRICT AS
> $$DECLARE
> RENAME status TO out_status;
> RENAME status_text TO out_status_text;
> BEGIN
> SELECT status, status_text
> FROM a()
> INTO out_status, out_status_text;
> RETURN;
> END;$$;
>
> See
> http://www.postgresql.org/docs/current/static/plpgsql-
> declarations.html#
> PLPGSQL-DECLARATION-RENAMING-VARS
>
> Yours,
> Laurenz Albe
From http://www.postgresql.org/docs/current/static/plpgsql-
declarations.html#PLPGSQL-DECLARATION-RENAMING-VARS
Note: RENAME appears to be broken as of PostgreSQL 7.3. Fixing this
is of low priority, since ALIAS covers most of the practical uses of
RENAME.
Seems to work though. Could somebody please confirm/reject that this
has been fixed?
Kristo Kaiv
http://kaiv.wordpress.com (PostgreSQL blog)
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: kristo.kaiv@skype.net, all@adv.magwien.gv.at
Subject: Re: [GENERAL] table column vs. out param [1:0]
In-Reply-To: <6E81C495-5225-4199-BFCB-9EE5FEB1CEF3@skype.net>
* 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