|
15 | 15 | * |
16 | 16 | * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group |
17 | 17 | * |
18 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.114 2009/08/01 19:59:41 tgl Exp $ |
| 18 | + * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.115 2009/11/05 04:38:29 tgl Exp $ |
19 | 19 | * |
20 | 20 | * ---------- |
21 | 21 | */ |
@@ -3963,10 +3963,12 @@ ri_HashCompareOp(Oid eq_opr, Oid typeid) |
3963 | 3963 | { |
3964 | 3964 | /* |
3965 | 3965 | * The declared input type of the eq_opr might be a |
3966 | | - * polymorphic type such as ANYARRAY or ANYENUM. If so, |
3967 | | - * assume the coercion is valid; otherwise complain. |
| 3966 | + * polymorphic type such as ANYARRAY or ANYENUM, or other |
| 3967 | + * special cases such as RECORD; find_coercion_pathway |
| 3968 | + * currently doesn't subsume these special cases. |
3968 | 3969 | */ |
3969 | | -if (!IsPolymorphicType(lefttype)) |
| 3970 | +if (!IsPolymorphicType(lefttype)&& |
| 3971 | +!IsBinaryCoercible(typeid,lefttype)) |
3970 | 3972 | elog(ERROR,"no conversion function from %s to %s", |
3971 | 3973 | format_type_be(typeid), |
3972 | 3974 | format_type_be(lefttype)); |
|