aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-08-17 19:58:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-08-17 19:58:06 +0000
commitec646dbc65afc8c55118cb3fb75cb6fd18d78dd8 (patch)
treebd256cf157c4636382d59938162326fccc70b62c /src/backend/commands/indexcmds.c
parentd89578ccbefb83aa9f9d1c00269cd866be2cc857 (diff)
downloadpostgresql-ec646dbc65afc8c55118cb3fb75cb6fd18d78dd8.tar.gz
postgresql-ec646dbc65afc8c55118cb3fb75cb6fd18d78dd8.zip
Create a 'type cache' that keeps track of the data needed for any particular
datatype by array_eq and array_cmp; use this to solve problems with memory leaks in array indexing support. The parser's equality_oper and ordering_oper routines also use the cache. Change the operator search algorithms to look for appropriate btree or hash index opclasses, instead of assuming operators named '<' or '=' have the right semantics. (ORDER BY ASC/DESC now also look at opclasses, instead of assuming '<' and '>' are the right things.) Add several more index opclasses so that there is no regression in functionality for base datatypes. initdb forced due to catalog additions.
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 36baf4690e3..45f4c3b4f7d 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.105 2003/08/04 02:39:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.106 2003/08/17 19:58:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -529,7 +529,8 @@ GetDefaultOpClass(Oid attrType, Oid accessMethodId)
* than one exact match, then someone put bogus entries in pg_opclass.
*
* The initial search is done by namespace.c so that we only consider
- * opclasses visible in the current namespace search path.
+ * opclasses visible in the current namespace search path. (See also
+ * typcache.c, which applies the same logic, but over all opclasses.)
*/
for (opclass = OpclassGetCandidates(accessMethodId);
opclass != NULL;