Re: Return results of join with polymorphically-defined table in pl/pgsql

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Return results of join with polymorphically-defined table in pl/pgsql
Дата
Msg-id CAKFQuwZYxwiNA0XDHqJUx700eCQ9CnQhj5DZcSis=edBkF0GGA@mail.gmail.com
обсуждение исходный текст
Ответ на Return results of join with polymorphically-defined table in pl/pgsql  (Peter Devoy <peter@3xe.co.uk>)
Список pgsql-general
On Sunday, July 24, 2016, Peter Devoy <peter@3xe.co.uk> wrote:
However, I would like to create a function which returns the resultset
of an INNER JOIN with table1 being polymorphic and table2 being a
result set of column types which do not change.  Is this possible?

Providing a concrete example might help.  But, SQL requires that, at runtime, all columns and types in the final query be defined at the time of its execution.  Even those coming from a function declared returning "record".  You can get dynamic SQL to accomplish pretty much anything as long as you keep that rule in mind.

David J.

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

Предыдущее
От: Peter Devoy
Дата:
Сообщение: Return results of join with polymorphically-defined table in pl/pgsql
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Return results of join with polymorphically-defined table in pl/pgsql