Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e79277

Browse files
committed
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 withthis case.
1 parent6bef82b commit8e79277

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/backend/utils/adt/ri_triggers.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
1717
*
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 $
1919
*
2020
* ----------
2121
*/
@@ -3963,10 +3963,12 @@ ri_HashCompareOp(Oid eq_opr, Oid typeid)
39633963
{
39643964
/*
39653965
* 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.
39683969
*/
3969-
if (!IsPolymorphicType(lefttype))
3970+
if (!IsPolymorphicType(lefttype)&&
3971+
!IsBinaryCoercible(typeid,lefttype))
39703972
elog(ERROR,"no conversion function from %s to %s",
39713973
format_type_be(typeid),
39723974
format_type_be(lefttype));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp