summaryrefslogtreecommitdiff
path: root/src/backend/parser/analyze.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-04-16 23:08:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-04-16 23:08:12 +0000
commit6cef5d2549110c6c0abb92215c2593e652024493 (patch)
tree7481a5b0bec7227c23f4b846cd7a1e40b47bf20e /src/backend/parser/analyze.c
parent4da51bfd6d89762f0a3cacde6edf1ac63c09349e (diff)
Operators live in namespaces. CREATE/DROP/COMMENT ON OPERATOR take
qualified operator names directly, for example CREATE OPERATOR myschema.+ ( ... ). To qualify an operator name in an expression you need to write OPERATOR(myschema.+) (thanks to Peter for suggesting an escape hatch). I also took advantage of having to reformat pg_operator to fix something that'd been bugging me for a while: mergejoinable operators should have explicit links to the associated cross-data-type comparison operators, rather than hardwiring an assumption that they are named < and >.
Diffstat (limited to 'src/backend/parser/analyze.c')
-rw-r--r--src/backend/parser/analyze.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index f71f40829c6..6a68adfff37 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.229 2002/04/12 19:11:49 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.230 2002/04/16 23:08:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1460,11 +1460,13 @@ transformFKConstraints(ParseState *pstate, CreateStmtContext *cxt)
{
/*
* fktypoid[i] is the foreign key table's i'th element's type
- * oid pktypoid[i] is the primary key table's i'th element's
- * type oid We let oper() do our work for us, including
- * elog(ERROR) if the types don't compare with =
+ * pktypoid[i] is the primary key table's i'th element's type
+ *
+ * We let oper() do our work for us, including elog(ERROR) if
+ * the types don't compare with =
*/
- Operator o = oper("=", fktypoid[i], pktypoid[i], false);
+ Operator o = oper(makeList1(makeString("=")),
+ fktypoid[i], pktypoid[i], false);
ReleaseSysCache(o);
}