Re: Functions which use an argument to decide which table to read

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Functions which use an argument to decide which table to read
Дата
Msg-id 20091009122329.GG19581@a-kretschmer.de
обсуждение исходный текст
Ответ на Functions which use an argument to decide which table to read  ("Jonathan Harden" <jonathan.harden@zeninternet.co.uk>)
Список pgsql-novice
In response to Jonathan Harden :
> Hello,
>
>
>
> I am trying to write a function which takes an argument and uses that argument
> to return a set of rows from a table with the name given (or possibly inferred)
> from the argument.

You have to use EXECUTE. Build a string that contains your select, and
execute that string.

Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)

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

Предыдущее
От: "Jonathan Harden"
Дата:
Сообщение: Functions which use an argument to decide which table to read
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Functions which use an argument to decide which table to read