Functions with dynamic queries

From: Gabriel Dovalo Carril <dovalo(at)terra(dot)es>
To: Lista SQL de postgres <pgsql-sql(at)postgresql(dot)org>
Subject: Functions with dynamic queries
Date: 2002-05-23 10:34:45
Message-ID: 3CECC5C5.BDF77592@terra.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message rhema 2002-05-23 11:27:20
Previous Message Tille, Andreas 2002-05-23 09:24:25 Re: Turning column into row