Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-05-11 Thread Qingqing Zhou
On Mon, May 4, 2015 at 1:23 PM, Robert Haas robertmh...@gmail.com wrote: I fixed several whitespace errors, reverted the permissions changes you included Sorry about the permission changes - didn't notice that bite. Thanks, Qingqing -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-05-04 Thread Robert Haas
On Fri, May 1, 2015 at 1:05 PM, Qingqing Zhou zhouqq.postg...@gmail.com wrote: On Thu, Apr 30, 2015 at 5:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think I'd have done many of these as + PlanState *outerPlan = outerPlanState(node); rather than finding assorted random places to

Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-05-01 Thread Qingqing Zhou
On Thu, Apr 30, 2015 at 5:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think I'd have done many of these as + PlanState *outerPlan = outerPlanState(node); rather than finding assorted random places to initialize the variables. Agreed. Attached patch is revision along this line.

Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-04-30 Thread Bruce Momjian
On Thu, Apr 30, 2015 at 08:46:55AM -0400, Robert Haas wrote: On Wed, Apr 15, 2015 at 3:38 PM, Qingqing Zhou zhouqq.postg...@gmail.com wrote: In executor context, outerPlanState(node) is the same as node-ss.ps.lefttree. We follow this in most places except a few. This patch clean up the

Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-04-30 Thread Robert Haas
On Wed, Apr 15, 2015 at 3:38 PM, Qingqing Zhou zhouqq.postg...@gmail.com wrote: In executor context, outerPlanState(node) is the same as node-ss.ps.lefttree. We follow this in most places except a few. This patch clean up the outliers and might save us a few instructions by removing

Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-04-30 Thread Robert Haas
On Thu, Apr 30, 2015 at 9:02 AM, Bruce Momjian br...@momjian.us wrote: On Thu, Apr 30, 2015 at 08:46:55AM -0400, Robert Haas wrote: On Wed, Apr 15, 2015 at 3:38 PM, Qingqing Zhou zhouqq.postg...@gmail.com wrote: In executor context, outerPlanState(node) is the same as node-ss.ps.lefttree.

Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-04-30 Thread Qingqing Zhou
On Thu, Apr 30, 2015 at 8:02 AM, Robert Haas robertmh...@gmail.com wrote: I don't mind the MSDOS newlines, but the UTF-16le bit is inconvenient. UTF-8 would be much better, so I don't have to figure out how to convert. The patch is generated via github windows tool and that's possibly why. I

Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-04-30 Thread Robert Haas
On Thu, Apr 30, 2015 at 1:44 PM, Qingqing Zhou zhouqq.postg...@gmail.com wrote: On Thu, Apr 30, 2015 at 8:02 AM, Robert Haas robertmh...@gmail.com wrote: I don't mind the MSDOS newlines, but the UTF-16le bit is inconvenient. UTF-8 would be much better, so I don't have to figure out how to

Re: [HACKERS] Use outerPlanState() consistently in executor code

2015-04-30 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Yeah, that seems fine. Anyone want to object to this? This hunk: @@ -299,6 +301,7 @@ ExecReScanSort(SortState *node) return; /* must drop pointer to sort result tuple */ + outerPlan = outerPlanState(node);

[HACKERS] Use outerPlanState() consistently in executor code

2015-04-15 Thread Qingqing Zhou
In executor context, outerPlanState(node) is the same as node-ss.ps.lefttree. We follow this in most places except a few. This patch clean up the outliers and might save us a few instructions by removing indirection. Most of changes are trivial. Except I take out an outerPlan nullable check in