]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix oversight in backpatch of 6cae9d2c10
authorAlexander Korotkov <akorotkov@postgresql.org>
Thu, 19 Sep 2019 20:36:01 +0000 (23:36 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Thu, 19 Sep 2019 20:39:35 +0000 (23:39 +0300)
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

src/backend/access/gist/gistget.c

index 93419f937be3ea45dce606bf9a8c92c043e7d347..1f8d599b8fcf13112d9e9c680d7b64a9e6689c70 100644 (file)
@@ -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)