Re: JOIN results of refcursor functions
От | Milan Oparnica |
---|---|
Тема | Re: JOIN results of refcursor functions |
Дата | |
Msg-id | ggmvnt$v5b$1@news.hub.org обсуждение исходный текст |
Ответ на | Re: JOIN results of refcursor functions (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: JOIN results of refcursor functions
|
Список | pgsql-sql |
Tom Lane wrote: > Milan Oparnica <milan.opa@gmail.com> writes: >> Is there any way to use INNER, LEFT and RIGHT JOIN between functions >> returning refcursor type. > > No. Make them return setof whatever instead. > > regards, tom lane > I would like yo avoid creating custom composite types required for setof. Is there any function I could use to retrieve the SQL command from named bound cursor from inside another function ? Idea: a. I declare a refcursor function "C1Ref" as select...from <table> b. In the new function (also of refcursor type) where I want to join C1Ref to something I replace the C1Ref call with SQL query text of that cursor (simply as a subquery). For this to work I must have a way to get C1Ref cursors SQL text in the new function. If possible, please give a small example because I'm quite new to PG and I still find very few examples on the web. PG is excellent, but I can't navigate through the documentation well. Thanks, Milan Oparnica
В списке pgsql-sql по дате отправления: