Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f)
От
Andres Freund
Тема
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f)
Дата
Msg-id
20170411213401.mntok2g5nfc4lrxb@alap3.anarazel.de
Ответ на
Список
Дерево обсуждения
[HACKERS] Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Rushabh Lathia <rushabh.lathia@gmail.com>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: Query fails when SRFs are part of FROM clause (Commit id:69f4b9c85f) Noah Misch <noah@leadboat.com>
Re: Re: Query fails when SRFs are part of FROM clause(Commit id: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: Re: Query fails when SRFs are part of FROM clause(Commit id: 69f4b9c85f) Noah Misch <noah@leadboat.com>
Re: Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause(Commit id: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause(Commit id: 69f4b9c85f) Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause(Commit id: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause(Commit id: 69f4b9c85f) Andres Freund <andres@anarazel.de>
Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Stephen Frost <sfrost@snowman.net>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) Rushabh Lathia <rushabh.lathia@gmail.com>
Re: [HACKERS] Query fails when SRFs are part of FROM clause (Commitid: 69f4b9c85f) "David G. Johnston" <david.g.johnston@gmail.com>
On 2017-04-11 17:25:52 -0400, Tom Lane wrote: > Andres Freund writes: > > Tom, do you have any opinion on the volatility stuff? > > What was the previous behavior for such cases? If it was reasonably > sane, we probably have to preserve it. If it was unpredictable or > completely wacko, maybe we don't. Previously we'd stash the result in a new tuplestore, because it happened inside ExecMakeTableFunctionResult()'s fallback path. The inner tuplestore (from the proper SRF) would get evaluated via the the isDone mechanism. That'd imo be a fair amount of work to emulate, because we'd have to manually go over the tuplesttore. But given that we do *not* have similar semantics for volatiles in the targetlist, I'm quite unconvinced that that's necessary. Consider e.g. my previous example of SELECT * FROM CAST(srf() * volatile_func() AS whatnot) rewritten into a saner version as SELECT srf * volatile_func() FROM srf() AS srf; here volatile_func() would before and now get re-evaluated if there's a rewind, and would only be invoked if the row is actually evaluated. - Andres
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Alexander Korotkov
Дата: