Functions: passing table names as parameters

From: gianpaolo <gianpaolo(at)preciso(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Functions: passing table names as parameters
Date: 2001-01-13 19:54:16
Message-ID: 01011320541600.03316@simpson.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I have three or four simple functions that do the same things on different
table. I would want to create only one function that receive as parameter the
name of the table on which operate.
i.e.

CREATE FUNCTION nid() RETURNS int4
as 'SELECT id from objcat_id where flag=0'
LANGUAGE 'sql';
I din't succeed in passing the table name as parameter.
Any suggestion?

thank in advance,
gianpaolo
--
gianpaolo racca
gianpaolo(at)preciso(dot)net
http://www.preciso.net

Browse pgsql-general by date

  From Date Subject
Next Message Dan Moschuk 2001-01-13 20:08:03 Re: FreeBSDers paying attention? (was Re: exit status 26)
Previous Message Bruno Wolff III 2001-01-13 15:44:46 precise interval documentation