summaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-05-19 04:14:33 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-05-19 04:14:33 +0000
commit7e1cb8246936b3ad2faa7285e373cbb09b49dc88 (patch)
treeacf1379315fe16f9542d795131aacccc8a0e2f6b /src/backend/commands/tablecmds.c
parent2d7a219b0d7a3b3519be65ead0f5dd7606d7f206 (diff)
Coercion sanity check in ri_HashCompareOp failed to allow for enums, as per
example from Rod Taylor. On reflection the correct test here is for any polymorphic type, not specifically ANYARRAY as in the original coding.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index da4d91b7a21..39f33a83e46 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.242.2.2 2008/05/09 22:37:34 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.242.2.3 2008/05/19 04:14:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -4139,11 +4139,11 @@ ATAddForeignKeyConstraint(AlteredTableInfo *tab, Relation rel,
/*
* Otherwise, look for an implicit cast from the FK type to the
* opcintype, and if found, use the primary equality operator.
- * This is a bit tricky because opcintype might be a generic type
- * such as ANYARRAY, and so what we have to test is whether the
- * two actual column types can be concurrently cast to that type.
- * (Otherwise, we'd fail to reject combinations such as int[] and
- * point[].)
+ * This is a bit tricky because opcintype might be a polymorphic
+ * type such as ANYARRAY or ANYENUM; so what we have to test is
+ * whether the two actual column types can be concurrently cast to
+ * that type. (Otherwise, we'd fail to reject combinations such
+ * as int[] and point[].)
*/
Oid input_typeids[2];
Oid target_typeids[2];