| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | pgsql-hackers(at)postgreSQL(dot)org | 
| Subject: | Re: RangeTblEntry.joinaliasvars representation change | 
| Date: | 2013-07-23 02:41:49 | 
| Message-ID: | 19268.1374547309@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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 | Content-Type | Size | 
|---|---|---|
| joinaliasvars-fix-1.patch | text/x-patch | 20.8 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2013-07-23 02:48:28 | Re: [9.4 CF 1] And then there were 5 | 
| Previous Message | Greg Smith | 2013-07-23 02:17:38 | Re: [9.4 CF 1] And then there were 5 |