Skip site navigation (1) Skip section navigation (2)

Re: PL/pgSQL RENAME functionality in TODOs

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: decibel(at)decibel(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/pgSQL RENAME functionality in TODOs
Date: 2007-02-02 17:03:47
Message-ID: BAY114-F76E1C7D16790CAA6FA7BBF99B0@phx.gbl (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
>But I think a way to get around that would be to RENAME the arguments  in 
>the DECLARE section, so user_id could become p_user_id under the  covers.

It's one case. But I don't belive so result will be more readable. Better 
solution is using names qualificated by function name. I am not sure if 
plpgsql support it. I thing so Oracle support it and SQL/PSM support it too.

  create or replace function fx(a integer, b integer)
  returns void as $$
    declare la integer, lb integer;
    select into la, lb tab.a, tab.b
       from tab
     where tab.a = fx.a and tab.b = fx.b

I am sorry. I don't belive so using RENAME is better

>So perhaps there is still a point to RENAME after-all, at least for  
>Jim Nasby                                            jim(at)nasby(dot)net
>EnterpriseDB      512.569.9461 (cell)

Pavel Stehule

Najdete si svou lasku a nove pratele na

pgsql-hackers by date

Next:From: David FetterDate: 2007-02-02 17:12:27
Subject: Re: writing new regexp functions
Previous:From: Pavel StehuleDate: 2007-02-02 16:53:26
Subject: Re: proposal: only superuser can change customized_options

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group