From: Gabriel Dovalo Carril <dovalo@terra.es>
To: Lista SQL de postgres <pgsql-sql@postgresql.org>
Subject: Functions with dynamic queries
Date: Thu, 23 May 2002 12:34:45 +0200
Message-ID: <3CECC5C5.BDF77592@terra.es> (raw)
Hi,
I would appreciate it if somebody could send me some examples
(or url) on how to create functions with text parameters, use these
parameters to build a dynamic query and return a value obtained from
that query.
A very simple case would be:
Create table people (
nif char(12),
name varchar(40),
primary (nif)
);
And now to create a function to return "name" value giving
"nif" values as a parameter.
Thanks
--
Gabriel D.
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: dovalo@terra.es
Subject: Re: Functions with dynamic queries
In-Reply-To: <3CECC5C5.BDF77592@terra.es>
* 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