From cb02610e503957d7ed9b4375537fb6275c16f1fa Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 15 Jun 2003 22:51:45 +0000 Subject: Adjust nestloop-with-inner-indexscan plan generation so that we catch some cases of redundant clauses that were formerly not caught. We have to special-case this because the clauses involved never get attached to the same join restrictlist and so the existing logic does not notice that they are redundant. --- src/backend/nodes/outfuncs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/backend/nodes/outfuncs.c') diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index cec7f09f0a9..f042e8a8d21 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.207 2003/06/06 15:04:02 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.208 2003/06/15 22:51:45 tgl Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -933,6 +933,7 @@ _outIndexPath(StringInfo str, IndexPath *node) WRITE_NODE_FIELD(indexinfo); WRITE_NODE_FIELD(indexqual); + WRITE_NODE_FIELD(indexjoinclauses); WRITE_ENUM_FIELD(indexscandir, ScanDirection); WRITE_FLOAT_FIELD(rows, "%.2f"); } @@ -1034,6 +1035,7 @@ _outRestrictInfo(StringInfo str, RestrictInfo *node) { WRITE_NODE_TYPE("RESTRICTINFO"); + /* NB: this isn't a complete set of fields */ WRITE_NODE_FIELD(clause); WRITE_BOOL_FIELD(ispusheddown); WRITE_NODE_FIELD(subclauseindices); @@ -1042,6 +1044,8 @@ _outRestrictInfo(StringInfo str, RestrictInfo *node) WRITE_OID_FIELD(mergejoinoperator); WRITE_OID_FIELD(left_sortop); WRITE_OID_FIELD(right_sortop); + WRITE_NODE_FIELD(left_pathkey); + WRITE_NODE_FIELD(right_pathkey); WRITE_OID_FIELD(hashjoinoperator); } -- cgit v1.2.3