aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-06 04:31:01 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-06 04:31:01 +0000
commitb0c4a50bbbbd62c444cb3806a97c1e51e2249cfd (patch)
tree0816cf1d1cc2a28665e5de740a20c80afbc4f5e7 /src/backend/nodes/copyfuncs.c
parentfa559a86eec2ae90fd63fd7e6563e42f7dc619e0 (diff)
downloadpostgresql-b0c4a50bbbbd62c444cb3806a97c1e51e2249cfd.tar.gz
postgresql-b0c4a50bbbbd62c444cb3806a97c1e51e2249cfd.zip
Instead of rechecking lossy index operators by putting them into the
regular qpqual ('filter condition'), add special-purpose code to nodeIndexscan.c to recheck them. This ends being almost no net addition of code, because the removal of planner code balances out the extra executor code, but it is significantly more efficient when a lossy operator is involved in an OR indexscan. The old implementation had to recheck the entire indexqual in such cases.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 75c2fa898d9..18a8a369e69 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.273 2004/01/05 05:07:35 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.274 2004/01/06 04:31:01 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -284,6 +284,17 @@ _copyIndexScan(IndexScan *from)
}
newnode->indxsubtype = newsubtype;
}
+ /* this can become COPY_NODE_FIELD when intlists are normal objects: */
+ {
+ List *newstrat = NIL;
+ List *tmp;
+
+ foreach(tmp, from->indxlossy)
+ {
+ newstrat = lappend(newstrat, listCopy(lfirst(tmp)));
+ }
+ newnode->indxlossy = newstrat;
+ }
COPY_SCALAR_FIELD(indxorderdir);
return newnode;