1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Adjust indexscan planning logic to keep RestrictInfo nodes associated

with index qual clauses in the Path representation.  This saves a little
work during createplan and (probably more importantly) allows reuse of
cached selectivity estimates during indexscan planning.  Also fix latent
bug: wrong plan would have been generated for a 'special operator' used
in a nestloop-inner-indexscan join qual, because the special operator
would not have gotten into the list of quals to recheck.  This bug is
only latent because at present the special-operator code could never
trigger on a join qual, but sooner or later someone will want to do it.
This commit is contained in:
Tom Lane
2004-01-05 23:39:54 +00:00
parent 5d472f6464
commit fa559a86ee
11 changed files with 400 additions and 188 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.227 2004/01/05 18:04:38 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.228 2004/01/05 23:39:53 tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@ -968,8 +968,9 @@ _outIndexPath(StringInfo str, IndexPath *node)
_outPathInfo(str, (Path *) node);
WRITE_NODE_FIELD(indexinfo);
WRITE_NODE_FIELD(indexqual);
WRITE_NODE_FIELD(indexjoinclauses);
WRITE_NODE_FIELD(indexclauses);
WRITE_NODE_FIELD(indexquals);
WRITE_BOOL_FIELD(isjoininner);
WRITE_ENUM_FIELD(indexscandir, ScanDirection);
WRITE_FLOAT_FIELD(rows, "%.0f");
}