Re: Function use in query
| От | David Johnston | 
|---|---|
| Тема | Re: Function use in query | 
| Дата | |
| Msg-id | 1370549878872-5758201.post@n5.nabble.com обсуждение исходный текст | 
| Ответ на | Re: Function use in query (Ioana Danes <ioanasoftware@yahoo.ca>) | 
| Список | pgsql-general | 
Ioana Danes wrote > create view tmp_view as > with func as ( > select tmp_Cashdrawer.CashdrawerID, test1(tmp_Cashdrawer.CashdrawerID) > as call > from tmp_Cashdrawer > ) > select func.CashdrawerID, (func.call).* > from func; So yeah, putting this into a view will not work. The WITH/CTE construct is an optimization barrier so the WHERE clause that is going to be used cannot be applied before the function call is performed - only afterwards. As I said before LATERAL in 9.3 may help - though others will have to comment - in cleaning up the syntax and multiple-calls. For <= 9.2 you will have to either live with the slightly verbose syntax or wrap what you need into user-defined functions. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Function-use-in-query-tp5758051p5758201.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: