Re: Passing a table name to a function for dynamic queries....

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Passing a table name to a function for dynamic queries....
Дата
Msg-id 42C2EA5B.6050804@archonet.com
обсуждение исходный текст
Ответ на Passing a table name to a function for dynamic queries....  ("Greg Patnude" <gpatnude@hotmail.com>)
Список pgsql-general
Greg Patnude wrote:
> I know I've seen the answer to this here before but cannot seem to find
> it....  Can anyone give me the quick & dirty answer to passing a table name
> to a function like this:
>
> CREATE OR REPLACE FUNCTION tbl_toarray(name) RETURNS text

Build the query as text and use EXECUTE to run it.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: CVS Build - No Doc
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Need help writing SQL statement