X-Git-Url: http://sigaev.ru/git/gitweb.cgi?p=smlar.git;a=blobdiff_plain;f=smlar_gist.c;fp=smlar_gist.c;h=b1d907393c1f79ca1e280928d2600b48e1887473;hp=788876cf983c64d443d2ef6274756866b6ccb223;hb=15c8b4b78d7ed329f52e520e824c68ae33748f8a;hpb=92dc9c753b98700a2533d160c243b6ee24606943 diff --git a/smlar_gist.c b/smlar_gist.c index 788876c..b1d9073 100644 --- a/smlar_gist.c +++ b/smlar_gist.c @@ -164,7 +164,9 @@ Array2HashedArray(ProcTypeInfo info, ArrayType *a) ptr = GETARR(sign); for(i=0;inelems;i++) - ptr[i] = DatumGetUInt32( FunctionCall1( &s->info->hashFunc, s->elems[i] ) ); + ptr[i] = DatumGetUInt32(FunctionCall1Coll(&s->info->hashFunc, + DEFAULT_COLLATION_OID, + s->elems[i])); /* * there is a collision of hash-function; len is always equal or less than @@ -239,7 +241,11 @@ getHashedCache(void *cache) getFmgrInfoHash(stat->info); for(i=0;inelems;i++) { - uint32 hash = DatumGetUInt32( FunctionCall1( &stat->info->hashFunc, stat->elems[i].datum ) ); + uint32 hash; + + hash = DatumGetUInt32(FunctionCall1Coll(&stat->info->hashFunc, + DEFAULT_COLLATION_OID, + stat->elems[i].datum)); int index = HASHVAL(hash); stat->helems[i].hash = hash; @@ -296,7 +302,9 @@ fillHashVal(void *cache, SimpleArray *a) getFmgrInfoHash(a->info); for(i=0;inelems;i++) - a->hash[i] = DatumGetUInt32( FunctionCall1( &a->info->hashFunc, a->elems[i] ) ); + a->hash[i] = DatumGetUInt32(FunctionCall1Coll(&a->info->hashFunc, + DEFAULT_COLLATION_OID, + a->elems[i])); }