summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/prep/_deadcode/prepkeyset.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-06-25 17:27:20 +0000
committerBruce Momjian <bruce@momjian.us>2002-06-25 17:27:20 +0000
commited275aea4270adf9c3ebeeb65a9a9af7b157e3ca (patch)
tree9c7e35a1fc74d42a570951847ddc75df403f43a4 /src/backend/optimizer/prep/_deadcode/prepkeyset.c
parent8a9462867a112dfb89ef6bae8361d073ec1b13e8 (diff)
The attached patch fixes some spelling mistakes, makes the
comments on one of the optimizer functions a lot more clear, adds a summary of the recent KSQO discussion to the comments in the code, adds regression tests for the bug with sequence state Tom fixed recently and another reg. test, and removes some PostQuel legacy stuff: ExecAppend -> ExecInsert, ExecRetrieve -> ExecSelect, etc. This was changed because the elog() messages from this routine are user-visible, so we should be using the SQL terms. Neil Conway
Diffstat (limited to 'src/backend/optimizer/prep/_deadcode/prepkeyset.c')
-rw-r--r--src/backend/optimizer/prep/_deadcode/prepkeyset.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/optimizer/prep/_deadcode/prepkeyset.c b/src/backend/optimizer/prep/_deadcode/prepkeyset.c
index b67431716fb..9de8ebb6c7f 100644
--- a/src/backend/optimizer/prep/_deadcode/prepkeyset.c
+++ b/src/backend/optimizer/prep/_deadcode/prepkeyset.c
@@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------
*
* prepkeyset.c
- * Special preperation for keyset queries.
+ * Special preparation for keyset queries (KSQO).
*
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
@@ -14,12 +14,6 @@
#include "postgres.h"
#include "optimizer/planmain.h"
-/*
- * Node_Copy
- * a macro to simplify calling of copyObject on the specified field
- */
-#define Node_Copy(from, newnode, field) newnode->field = copyObject(from->field)
-
bool _use_keyset_query_optimizer = FALSE;
#ifdef ENABLE_KEY_SET_QUERY
@@ -55,13 +49,20 @@ static int TotalExpr;
* a HAVING, or a GROUP BY. It must be a single table and have KSQO
* set to 'on'.
*
- * The primary use of this transformation is to avoid the exponrntial
+ * The primary use of this transformation is to avoid the exponential
* memory consumption of cnfify() and to make use of index access
* methods.
*
* daveh@insightdist.com 1998-08-31
*
* May want to also prune out duplicate terms.
+ *
+ * XXX: this code is currently not compiled because it has not been
+ * updated to work with the re-implementation of UNION/INTERSECT/EXCEPT
+ * in PostgreSQL 7.1. However, it is of questionable value in any
+ * case, because it changes the semantics of the original query:
+ * UNION will add an implicit SELECT DISTINCT, which might change
+ * the results that are returned.
**********************************************************************/
void
transformKeySetQuery(Query *origNode)