mirror of
https://github.com/postgres/postgres.git
synced 2025-11-03 09:13:20 +03:00
Clean up handling of dropped columns in NAMEDTUPLESTORE RTEs.
The NAMEDTUPLESTORE patch piggybacked on the infrastructure for TABLEFUNC/VALUES/CTE RTEs, none of which can ever have dropped columns, so the possibility was ignored most places. Fix that, including adding a specification to parsenodes.h about what it's supposed to look like. In passing, clean up assorted comments that hadn't been maintained properly by said patch. Per bug #14799 from Philippe Beaudoin. Back-patch to v10. Discussion: https://postgr.es/m/20170906120005.25630.84360@wrigleys.postgresql.org
This commit is contained in:
@@ -1025,6 +1025,11 @@ typedef struct RangeTblEntry
|
||||
* from the catalogs if 'relid' was supplied, but we'd still need these
|
||||
* for TupleDesc-based ENRs, so we might as well always store the type
|
||||
* info here).
|
||||
*
|
||||
* For ENRs only, we have to consider the possibility of dropped columns.
|
||||
* A dropped column is included in these lists, but it will have zeroes in
|
||||
* all three lists (as well as an empty-string entry in eref). Testing
|
||||
* for zero coltype is the standard way to detect a dropped column.
|
||||
*/
|
||||
List *coltypes; /* OID list of column type OIDs */
|
||||
List *coltypmods; /* integer list of column typmods */
|
||||
|
||||
Reference in New Issue
Block a user