X-Git-Url: http://sigaev.ru/git/gitweb.cgi?p=smlar.git;a=blobdiff_plain;f=smlar_gist.c;h=7d77788af34dc23332ad163c0584c36c0c4c3c8a;hp=8cd044b5b60e13ad7265a4b4839088d06946ed79;hb=HEAD;hpb=8a465bb03ae7e2e85c3f9e1ebd75eb4ec830f3c5 diff --git a/smlar_gist.c b/smlar_gist.c index 8cd044b..480d744 100644 --- a/smlar_gist.c +++ b/smlar_gist.c @@ -3,7 +3,11 @@ #include "fmgr.h" #include "access/gist.h" #include "access/skey.h" +#if PG_VERSION_NUM < 130000 +#include "access/tuptoaster.h" +#else #include "access/heaptoast.h" +#endif #include "utils/memutils.h" typedef struct SmlSign { @@ -242,11 +246,12 @@ getHashedCache(void *cache) for(i=0;inelems;i++) { uint32 hash; + int index; hash = DatumGetUInt32(FunctionCall1Coll(&stat->info->hashFunc, DEFAULT_COLLATION_OID, stat->elems[i].datum)); - int index = HASHVAL(hash); + index = HASHVAL(hash); stat->helems[i].hash = hash; stat->helems[i].idfMin = stat->helems[i].idfMax = stat->elems[i].idf;