summaryrefslogtreecommitdiff
path: root/src/backend/nodes
diff options
context:
space:
mode:
authorTom Lane2003-05-28 16:04:02 +0000
committerTom Lane2003-05-28 16:04:02 +0000
commitfc8d970cbcdd6f025475822a4cf01dfda0873226 (patch)
treeca697026dbada6a022dec471191aab5a0ba7eb20 /src/backend/nodes
parente5f19598e07e9a0fc0a5c0f18bfac1fe92d21fc5 (diff)
Replace functional-index facility with expressional indexes. Any column
of an index can now be a computed expression instead of a simple variable. Restrictions on expressions are the same as for predicates (only immutable functions, no sub-selects). This fixes problems recently introduced with inlining SQL functions, because the inlining transformation is applied to both expression trees so the planner can still match them up. Along the way, improve efficiency of handling index predicates (both predicates and index expressions are now cached by the relcache) and fix 7.3 oversight that didn't record dependencies of predicate expressions.
Diffstat (limited to 'src/backend/nodes')
-rw-r--r--src/backend/nodes/copyfuncs.c5
-rw-r--r--src/backend/nodes/equalfuncs.c5
-rw-r--r--src/backend/nodes/outfuncs.c5
3 files changed, 6 insertions, 9 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 1dc79a4dc40..4a5f858d7b0 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
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.250 2003/05/06 00:20:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.251 2003/05/28 16:03:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1421,8 +1421,7 @@ _copyIndexElem(IndexElem *from)
IndexElem *newnode = makeNode(IndexElem);
COPY_STRING_FIELD(name);
- COPY_NODE_FIELD(funcname);
- COPY_NODE_FIELD(args);
+ COPY_NODE_FIELD(expr);
COPY_NODE_FIELD(opclass);
return newnode;
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 6b9cac028b9..ff5400f6ee8 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -18,7 +18,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.193 2003/05/06 00:20:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.194 2003/05/28 16:03:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1466,8 +1466,7 @@ static bool
_equalIndexElem(IndexElem *a, IndexElem *b)
{
COMPARE_STRING_FIELD(name);
- COMPARE_NODE_FIELD(funcname);
- COMPARE_NODE_FIELD(args);
+ COMPARE_NODE_FIELD(expr);
COMPARE_NODE_FIELD(opclass);
return true;
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 377c6bd2297..a1b238c93cf 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.205 2003/05/06 00:20:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.206 2003/05/28 16:03:56 tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -1181,8 +1181,7 @@ _outIndexElem(StringInfo str, IndexElem *node)
WRITE_NODE_TYPE("INDEXELEM");
WRITE_STRING_FIELD(name);
- WRITE_NODE_FIELD(funcname);
- WRITE_NODE_FIELD(args);
+ WRITE_NODE_FIELD(expr);
WRITE_NODE_FIELD(opclass);
}