Re: [GENERAL] table column vs. out param [1:0]

From: Kristo Kaiv <kristo(dot)kaiv(at)skype(dot)net>
To: Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at>, pgsql-sql(at)postgresql(dot)org
Subject: Re: [GENERAL] table column vs. out param [1:0]
Date: 2007-08-27 07:52:38
Message-ID: 6E81C495-5225-4199-BFCB-9EE5FEB1CEF3@skype.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql


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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kristo Kaiv 2007-08-27 07:55:09 Re: Converting non-null unique idx to pkey
Previous Message Albe Laurenz 2007-08-27 07:44:27 Re: pgsql functions: get column headers; optional arguments

Browse pgsql-sql by date

  From Date Subject
Next Message Ashish Karalkar 2007-08-27 11:18:44 Re: List of FKeys ?
Previous Message Tom Lane 2007-08-27 03:48:32 Re: List of FKeys ?