From: Alexander Korotkov Date: Thu, 19 Sep 2019 20:36:01 +0000 (+0300) Subject: Fix oversight in backpatch of 6cae9d2c10 X-Git-Tag: REL9_5_20~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=388939748a7683b1e703de8d11ead60b0be3edc7;p=thirdparty%2Fpostgresql.git Fix oversight in backpatch of 6cae9d2c10 During backpatch of 6cae9d2c10 Float8GetDatum() was accidentally removed. This commit turns it back. Reported-by: Erik Rijkers Discussion: https://postgr.es/m/6d51305e1159241cabee132f7efc7eff%40xs4all.nl Author: Tom Lane Backpatch-through: from 11 to 9.5 --- diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index 93419f937be..1f8d599b8fc 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -485,7 +485,7 @@ getNextNearest(IndexScanDesc scan) if (!scan->xs_orderbynulls[i]) pfree(DatumGetPointer(scan->xs_orderbyvals[i])); #endif - scan->xs_orderbyvals[i] = item->distances[i].value; + scan->xs_orderbyvals[i] = Float8GetDatum(item->distances[i].value); scan->xs_orderbynulls[i] = item->distances[i].isnull; } else if (so->orderByTypes[i] == FLOAT4OID)