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 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 (pgsql-hackers@postgresql.org) To make

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 wrote: > On Thu, Apr 30, 2015 at 5:04 PM, Tom Lane 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. >> >

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 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. Except for a

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

2015-04-30 Thread Tom Lane
Robert Haas 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); ExecClearTuple(node->ss.ps.p

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 wrote: > On Thu, Apr 30, 2015 at 8:02 AM, Robert Haas 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 g

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 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 regenerated it in

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 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 >> wrote: >> > In executor context, outerPlanState(node) is the same as >> > node->ss.ps.lefttree. We follow this in most places e

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 > 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 s

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 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 indirection. > > Most of change

[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 gr