diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-11-05 04:38:35 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-11-05 04:38:35 +0000 |
commit | 2c614052066cba5cb409d66246e699969e90b657 (patch) | |
tree | f776f13fb96c3f714ac6ff7ca3944d5898dd83c7 /src | |
parent | 743335934710f211029593e5af1f22b7c5363bf7 (diff) | |
download | postgresql-2c614052066cba5cb409d66246e699969e90b657.tar.gz postgresql-2c614052066cba5cb409d66246e699969e90b657.zip |
Allow binary-coercible cases in ri_HashCompareOp; there are some such cases
that are not handled by find_coercion_pathway, notably composite->RECORD.
Now that 8.4 supports composites as primary keys, it's worth dealing with
this case.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/adt/ri_triggers.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index 5bcbd633043..05e840dae5f 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -15,7 +15,7 @@ * * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.113 2009/06/11 14:49:04 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.113.2.1 2009/11/05 04:38:35 tgl Exp $ * * ---------- */ @@ -3971,10 +3971,12 @@ ri_HashCompareOp(Oid eq_opr, Oid typeid) { /* * The declared input type of the eq_opr might be a - * polymorphic type such as ANYARRAY or ANYENUM. If so, - * assume the coercion is valid; otherwise complain. + * polymorphic type such as ANYARRAY or ANYENUM, or other + * special cases such as RECORD; find_coercion_pathway + * currently doesn't subsume these special cases. */ - if (!IsPolymorphicType(lefttype)) + if (!IsPolymorphicType(lefttype) && + !IsBinaryCoercible(typeid, lefttype)) elog(ERROR, "no conversion function from %s to %s", format_type_be(typeid), format_type_be(lefttype)); |