diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-05-17 21:22:12 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-05-17 21:22:12 -0400 |
commit | 424661913c06af76a46fdff9cc24cc57abf14fb3 (patch) | |
tree | 5d27c01f805aaf3cce92844344e51f37670573a4 /src/include | |
parent | b14cf229f4bd7238be2e31d873dc5dd241d3871e (diff) |
Fix failure to copy IndexScan.indexorderbyops in copyfuncs.c.
This oversight results in a crash at executor startup if the plan has
been copied. outfuncs.c was missed as well.
While we could probably have taught both those files to cope with the
originally chosen representation of an Oid array, it would have been
painful, not least because there'd be no easy way to verify the array
length. An Oid List is far easier to work with. And AFAICS, there is
no particular notational benefit to using an array rather than a list
in the existing parts of the patch either. So just change it to a list.
Error in commit 35fcb1b3d038a501f3f4c87c05630095abaaadab, which is new,
so no need for back-patch.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/nodes/plannodes.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 51906d68985..b70231919fe 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -73,7 +73,6 @@ typedef struct PlannedStmt int nParamExec; /* number of PARAM_EXEC Params used */ bool hasRowSecurity; /* row security applied? */ - } PlannedStmt; /* macro for fetching the Plan associated with a SubPlan node */ @@ -320,10 +319,10 @@ typedef Scan SampleScan; * indexorderbyorig is used at runtime to recheck the ordering, if the index * cannot calculate an accurate ordering. It is also needed for EXPLAIN. * - * indexorderbyops is an array of operators used to sort the ORDER BY - * expressions, used together with indexorderbyorig to recheck ordering at run - * time. (Note these fields are used for amcanorderbyop cases, not amcanorder - * cases.) + * indexorderbyops is a list of the OIDs of the operators used to sort the + * ORDER BY expressions. This is used together with indexorderbyorig to + * recheck ordering at run time. (Note that indexorderby, indexorderbyorig, + * and indexorderbyops are used for amcanorderbyop cases, not amcanorder.) * * indexorderdir specifies the scan ordering, for indexscans on amcanorder * indexes (for other indexes it should be "don't care"). @@ -337,7 +336,7 @@ typedef struct IndexScan List *indexqualorig; /* the same in original form */ List *indexorderby; /* list of index ORDER BY exprs */ List *indexorderbyorig; /* the same in original form */ - Oid *indexorderbyops; /* operators to sort ORDER BY exprs */ + List *indexorderbyops; /* OIDs of sort ops for ORDER BY exprs */ ScanDirection indexorderdir; /* forward or backward or don't care */ } IndexScan; |