Re: explain and PARAM_EXEC
От | Robert Haas |
---|---|
Тема | Re: explain and PARAM_EXEC |
Дата | |
Msg-id | 603c8f071002192005q652878acy76af233c2f020f79@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: explain and PARAM_EXEC (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: explain and PARAM_EXEC
Re: explain and PARAM_EXEC |
Список | pgsql-hackers |
On Fri, Feb 19, 2010 at 10:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: >> So I guess there are two issues here: (1) somehow I feel like we >> should be telling the user what expression is being used to initialize >> $0, $1, etc. when they are PARAM_EXEC parameters; > > Maybe, but the only reasonable place to put it would be within the > (SubPlan N) reference, which is not a place where verboseness would be > appreciated, I think. In principle it could look something like > > (SubPlan N ($0 := b.oid)) > > but with a few parameters and a bunch of other stuff on the same line > that would get out of hand. I thought maybe it could do something like this: SubPlan 1 Parameters: $0 := b.oid -> Index Scan etc. ...but maybe that doesn't work if it can be called with different parameters from different places? Not sure if that's possible. >> and (2) where does >> the output list for the sequential scan "go" when there's only one >> table involved? > > The (SubPlan N) reference is meant to be understood as an expression > element yielding the output of the subplan. One of us is confused, > because I don't see any material difference between your examples; > they're all calling the subplan in the same way. I don't think it's a stretch to say that I'm the one who is confused. I am under the (perhaps faulty) impression that when evaluating an expression there can only ever be three tuples in score: inner, outer, and scan. So when we go to evaluate the expression whose result will be assigned to $0, where do we get those inner and/or outer and/or scan tuples from? IOW, I understand where the subplan is putting its OUTPUT, what I don't understand is what context is being used to set its input parameters. ...Robert
В списке pgsql-hackers по дате отправления: