@@ -80,11 +80,13 @@ uint32
80
80
_hash_datum2hashkey (Relation rel , Datum key )
81
81
{
82
82
FmgrInfo * procinfo ;
83
+ Oid collation ;
83
84
84
85
/* XXX assumes index has only one attribute */
85
86
procinfo = index_getprocinfo (rel , 1 , HASHPROC );
87
+ collation = rel -> rd_indcollation [0 ];
86
88
87
- return DatumGetUInt32 (FunctionCall1 (procinfo , key ));
89
+ return DatumGetUInt32 (FunctionCall1Coll (procinfo , collation , key ));
88
90
}
89
91
90
92
/*
@@ -98,6 +100,7 @@ uint32
98
100
_hash_datum2hashkey_type (Relation rel , Datum key , Oid keytype )
99
101
{
100
102
RegProcedure hash_proc ;
103
+ Oid collation ;
101
104
102
105
/* XXX assumes index has only one attribute */
103
106
hash_proc = get_opfamily_proc (rel -> rd_opfamily [0 ],
@@ -108,8 +111,9 @@ _hash_datum2hashkey_type(Relation rel, Datum key, Oid keytype)
108
111
elog (ERROR , "missing support function %d(%u,%u) for index \"%s\"" ,
109
112
HASHPROC , keytype , keytype ,
110
113
RelationGetRelationName (rel ));
114
+ collation = rel -> rd_indcollation [0 ];
111
115
112
- return DatumGetUInt32 (OidFunctionCall1 (hash_proc , key ));
116
+ return DatumGetUInt32 (OidFunctionCall1Coll (hash_proc , collation , key ));
113
117
}
114
118
115
119
/*
0 commit comments