Re: Using a tablename as a parameter to a function.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using a tablename as a parameter to a function.
Дата
Msg-id 11888.1008891215@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Using a tablename as a parameter to a function.  (Stephen Ingram <ingram@samsix.com>)
Список pgsql-novice
Stephen Ingram <ingram@samsix.com> writes:
> Is it possible (legal syntax, I mean) to pass a tablename
> as a parameter to a function?

You could pass the tablename as a string argument (eg, text or varchar)
and then construct your queries as strings for plpgsql's EXECUTE
function.  This is notationally tedious, and you lose some performance
because there's no possibility to cache and reuse query plans, but
it will work.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Trigger question
Следующее
От: Pat Marchant
Дата:
Сообщение: Re: Trigger question