From: | Kristo Kaiv <kristo(dot)kaiv(at)skype(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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 19:02:27 |
Message-ID: | 653F43DF-3B1C-47EB-A8FA-3EF555E7BFEE@skype.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
On 27.08.2007, at 18:07, Tom Lane wrote:
> Kristo Kaiv <kristo(dot)kaiv(at)skype(dot)net> writes:
>> 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?
>
> It "works" only for very small values of "works". See the links in
> the TODO item for it.
>
> regards, tom lane
Tom, the TODO item says:
Server-Side Languages
PL/pgSQL
Fix RENAME to work on variables other than OLD/NEW
but it seems to already work. I have tested it on 8.2 and have not
noticed any problems.
orderdb_test=# \df+ test
List of functions
-[ RECORD 1 ]-------+--------------------------
Schema | public
Name | test
Result data type | text
Argument data types | i_a text, OUT asi text
Owner | kristok
Language | plpgsql
Source code |
: DECLARE
: -- o_asi ALIAS FOR $2;
: RENAME asi TO o_asi;
: BEGIN
: select 32 into o_asi;
: return;
: END;
:
Description |
orderdb_test=# select * from test(123);
asi
-----
32
(1 row)
Kristo Kaiv
http://kaiv.wordpress.com (PostgreSQL blog)
From | Date | Subject | |
---|---|---|---|
Next Message | Jessie | 2007-08-27 19:04:25 | Npgsql GUI problem C#.net |
Previous Message | Jeff Amiel | 2007-08-27 18:56:59 | Re: Out of Memory - 8.2.4 |
From | Date | Subject | |
---|---|---|---|
Next Message | Kitter Georgiy | 2007-08-28 04:41:47 | pg & Delphi |
Previous Message | Michael Glaesemann | 2007-08-27 18:20:18 | Re: fetch first rows of grouped data |