Functions: passing table names as parameters - Mailing list pgsql-general

From gianpaolo
Subject Functions: passing table names as parameters
Date
Msg-id 01011320541600.03316@simpson.localdomain
Whole thread Raw
List 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@preciso.net
http://www.preciso.net

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: precise interval documentation
Next
From: Dan Moschuk
Date:
Subject: Re: FreeBSDers paying attention? (was Re: exit status 26)