Re: [GENERAL] table column vs. out param [1:0] - Mailing list pgsql-sql

From Kristo Kaiv
Subject Re: [GENERAL] table column vs. out param [1:0]
Date
Msg-id 6E81C495-5225-4199-BFCB-9EE5FEB1CEF3@skype.net
Whole thread Raw
Responses Re: [GENERAL] table column vs. out param [1:0]
List 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
PLPGSQL-DECLARATION-RENAMING-VARS

Yours,
Laurenz Albe
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)


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: List of FKeys ?
Next
From: "Ashish Karalkar"
Date:
Subject: Re: List of FKeys ?