Re: Create a function that creates a function which returns a table and return that table in one step

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Create a function that creates a function which returns a table and return that table in one step
Дата
Msg-id 7350.1227287920@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Create a function that creates a function which returns a table and return that table in one step  (Rainer Schuetz <rs@bagong.de>)
Список pgsql-novice
Rainer Schuetz <rs@bagong.de> writes:
> I have a function (the 'outer' function) that creates another function
> which runs a select-query on a table. This table is specified by a
> parameter I use when running the outer function (there are many
> tables, on which the query could be executed and I would like to
> prevent having to write my function for each of them).

Introducing the extra function seems to be just complicating your life.
Why don't you just EXECUTE the desired SELECT directly from the main
function?

            regards, tom lane

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

Предыдущее
От: Rainer Schuetz
Дата:
Сообщение: Create a function that creates a function which returns a table and return that table in one step
Следующее
От: Bruce Hyatt
Дата:
Сообщение: Roles