From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Martín Marqués <martin@bugs.unl.edu.ar>
Cc: pgsql-sql@postgresql.org
Subject: Re: variables in procedures
Date: Fri, 30 Nov 2001 09:34:47 -0800 (PST)
Message-ID: <20011130093356.A55762-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <20011130134344.BED7EFA61@bugs.unl.edu.ar>
On Fri, 30 Nov 2001, [iso-8859-1] Martín Marqués 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, martin@bugs.unl.edu.ar
Subject: Re: variables in procedures
In-Reply-To: <20011130093356.A55762-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox