Re: variables in procedures

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: variables in procedures
Date: 2001-11-30 17:34:47
Message-ID: 20011130093356.A55762-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 30 Nov 2001, [iso-8859-1] Martn Marqus wrote:

> How can I distinguish between the name and the value of a variable?
>
> Example:
>
> CREATE FUNCTION test(VARCHAR) RETURNS INTEGER AS '
>
> DECLARE
> col1 ALIAS FOR $1
> BEGIN
> select col1 from tab where col1=col1;
> END;
> LANGUAGE 'plpgsql';
>
>
> Is my doubt understood?

AFAIK you don't distinguish, you'll probably need to name
the variable something else.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter T. Brown 2001-11-30 17:46:09 Re: contracting tables
Previous Message Roberto Mello 2001-11-30 17:33:21 Re: Any available solution to port CONNECT BY of oracle to postgresql