Functions: passing table names as parameters

Поиск
Список
Период
Сортировка
От gianpaolo
Тема Functions: passing table names as parameters
Дата
Msg-id 01011320541600.03316@simpson.localdomain
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: precise interval documentation
Следующее
От: Dan Moschuk
Дата:
Сообщение: Re: FreeBSDers paying attention? (was Re: exit status 26)