aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-02-10 19:01:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-02-10 19:01:12 +0000
commit3ac1ac58cc34b87fd5da2abc146bb386ef587dec (patch)
treef55eab643dadc660a2e9532e415549cea528905f /src/include
parentb35fdaaa1a8439b9437190287ed1ed17edf02efd (diff)
downloadpostgresql-3ac1ac58cc34b87fd5da2abc146bb386ef587dec.tar.gz
postgresql-3ac1ac58cc34b87fd5da2abc146bb386ef587dec.zip
Change search for default operator classes so that it examines all opclasses
regardless of the current schema search path. Since CREATE OPERATOR CLASS only allows one default opclass per datatype regardless of schemas, this should have minimal impact, and it fixes problems with failure to find a desired opclass while restoring dump files. Per discussion at http://archives.postgresql.org/pgsql-hackers/2006-02/msg00284.php. Remove now-redundant-or-unused code in typcache.c and namespace.c, and backpatch as far as 8.0.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/namespace.h18
-rw-r--r--src/include/commands/defrem.h3
2 files changed, 3 insertions, 18 deletions
diff --git a/src/include/catalog/namespace.h b/src/include/catalog/namespace.h
index d3f0dc98098..4f2d1ef5061 100644
--- a/src/include/catalog/namespace.h
+++ b/src/include/catalog/namespace.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/namespace.h,v 1.37 2005/10/15 02:49:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/namespace.h,v 1.38 2006/02/10 19:01:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,21 +32,6 @@ typedef struct _FuncCandidateList
Oid args[1]; /* arg types --- VARIABLE LENGTH ARRAY */
} *FuncCandidateList; /* VARIABLE LENGTH STRUCT */
-/*
- * This structure holds a list of opclass candidates found by namespace
- * lookup.
- */
-typedef struct _OpclassCandidateList
-{
- struct _OpclassCandidateList *next;
- char *opcname_tmp; /* for internal use of namespace lookup */
- int pathpos; /* for internal use of namespace lookup */
- Oid oid; /* the opclass's OID */
- Oid opcintype; /* type of data indexed by opclass */
- bool opcdefault; /* T if opclass is default for opcintype */
- Oid opckeytype; /* type of data in index, or InvalidOid */
-} *OpclassCandidateList;
-
extern Oid RangeVarGetRelid(const RangeVar *relation, bool failOK);
extern Oid RangeVarGetCreationNamespace(const RangeVar *newRelation);
@@ -62,7 +47,6 @@ extern bool FunctionIsVisible(Oid funcid);
extern FuncCandidateList OpernameGetCandidates(List *names, char oprkind);
extern bool OperatorIsVisible(Oid oprid);
-extern OpclassCandidateList OpclassGetCandidates(Oid amid);
extern Oid OpclassnameGetOpcid(Oid amid, const char *opcname);
extern bool OpclassIsVisible(Oid opcid);
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h
index 39603cf31f2..230bd63765c 100644
--- a/src/include/commands/defrem.h
+++ b/src/include/commands/defrem.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.69 2005/11/21 12:49:32 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.70 2006/02/10 19:01:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,6 +42,7 @@ extern char *makeObjectName(const char *name1, const char *name2,
const char *label);
extern char *ChooseRelationName(const char *name1, const char *name2,
const char *label, Oid namespace);
+extern Oid GetDefaultOpClass(Oid type_id, Oid am_id);
/* commands/functioncmds.c */
extern void CreateFunction(CreateFunctionStmt *stmt);