Re: RangeTblEntry.joinaliasvars representation change - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RangeTblEntry.joinaliasvars representation change
Date
Msg-id 19268.1374547309@sss.pgh.pa.us
Whole thread Raw
In response to RangeTblEntry.joinaliasvars representation change  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> After some reflection I think that the best fix is to redefine
> AcquireRewriteLocks' processing of dropped columns so that it puts an
> actual null pointer, not a consed-up Const, into the joinaliasvars list
> item.

Here's a complete patch along that line.  Possibly worthy of note is
that I chose to keep expandRTE's API the same as before, ie, it returns
a NULL Const for a dropped column (when include_dropped is true).  I had
intended to change it to return a null pointer to match the change in
the underlying data structure, but found that most of the callers
passing include_dropped = true need the Consts, because they're going to
construct a RowExpr that has to have null constants for the dropped
columns.

In HEAD, I'm a bit tempted to move strip_implicit_coercions into
nodes/nodeFuncs.c, so that we don't have the ugliness of the parser
calling an optimizer subroutine.  But I propose applying this to back
branches as-is.

            regards, tom lane


Attachment

pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: [9.4 CF 1] And then there were 5
Next
From: Tom Lane
Date:
Subject: Re: [9.4 CF 1] And then there were 5