pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martín Marqués <martin@bugs.unl.edu.ar>
To: pgsql-sql@postgresql.org
Subject: variables in procedures
Date: Fri, 30 Nov 2001 10:43:43 -0300
Message-ID: <20011130134344.BED7EFA61@bugs.unl.edu.ar> (raw)

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?

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------



view thread (3+ messages)  latest in thread

Message-ID: <20011130134344.BED7EFA61@bugs.unl.edu.ar>
Permalink:  ../20011130134344.BED7EFA61@bugs.unl.edu.ar/
Also on:    postgresql.org/message-id/20011130134344.BED7EFA61@bugs.unl.edu.ar

 · 

reply

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: martin@bugs.unl.edu.ar
  Subject: Re: variables in procedures
  In-Reply-To: <20011130134344.BED7EFA61@bugs.unl.edu.ar>

* 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