@@ -80,11 +80,13 @@ uint32
8080_hash_datum2hashkey (Relation rel ,Datum key )
8181{
8282FmgrInfo * procinfo ;
83+ Oid collation ;
8384
8485/* XXX assumes index has only one attribute */
8586procinfo = index_getprocinfo (rel ,1 ,HASHPROC );
87+ collation = rel -> rd_indcollation [0 ];
8688
87- return DatumGetUInt32 (FunctionCall1 (procinfo ,key ));
89+ return DatumGetUInt32 (FunctionCall1Coll (procinfo , collation ,key ));
8890}
8991
9092/*
@@ -98,6 +100,7 @@ uint32
98100_hash_datum2hashkey_type (Relation rel ,Datum key ,Oid keytype )
99101{
100102RegProcedure hash_proc ;
103+ Oid collation ;
101104
102105/* XXX assumes index has only one attribute */
103106hash_proc = get_opfamily_proc (rel -> rd_opfamily [0 ],
@@ -108,8 +111,9 @@ _hash_datum2hashkey_type(Relation rel, Datum key, Oid keytype)
108111elog (ERROR ,"missing support function %d(%u,%u) for index \"%s\"" ,
109112HASHPROC ,keytype ,keytype ,
110113RelationGetRelationName (rel ));
114+ collation = rel -> rd_indcollation [0 ];
111115
112- return DatumGetUInt32 (OidFunctionCall1 (hash_proc ,key ));
116+ return DatumGetUInt32 (OidFunctionCall1Coll (hash_proc , collation ,key ));
113117}
114118
115119/*