| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Peter Devoy <peter(at)3xe(dot)co(dot)uk> |
| Cc: | "Psql_General (E-mail)" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Return results of join with polymorphically-defined table in pl/pgsql |
| Date: | 2016-07-25 00:48:32 |
| Message-ID: | CAKFQuwZYxwiNA0XDHqJUx700eCQ9CnQhj5DZcSis=edBkF0GGA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Sunday, July 24, 2016, Peter Devoy <peter(at)3xe(dot)co(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John R Pierce | 2016-07-25 01:03:46 | Re: Return results of join with polymorphically-defined table in pl/pgsql |
| Previous Message | Peter Devoy | 2016-07-24 23:45:47 | Return results of join with polymorphically-defined table in pl/pgsql |