From 46651ce6fe013220ed397add242004d764fc0153 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baumann@progress-linux.org>
Date: Sat, 4 May 2024 14:15:05 +0200
Subject: Adding upstream version 14.5.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
---
 contrib/btree_gist/sql/float4.sql | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 contrib/btree_gist/sql/float4.sql

(limited to 'contrib/btree_gist/sql/float4.sql')

diff --git a/contrib/btree_gist/sql/float4.sql b/contrib/btree_gist/sql/float4.sql
new file mode 100644
index 0000000..3da1ce9
--- /dev/null
+++ b/contrib/btree_gist/sql/float4.sql
@@ -0,0 +1,37 @@
+-- float4 check
+
+CREATE TABLE float4tmp (a float4);
+
+\copy float4tmp from 'data/float4.data'
+
+SET enable_seqscan=on;
+
+SELECT count(*) FROM float4tmp WHERE a <  -179.0;
+
+SELECT count(*) FROM float4tmp WHERE a <= -179.0;
+
+SELECT count(*) FROM float4tmp WHERE a  = -179.0;
+
+SELECT count(*) FROM float4tmp WHERE a >= -179.0;
+
+SELECT count(*) FROM float4tmp WHERE a >  -179.0;
+
+SELECT a, a <-> '-179.0' FROM float4tmp ORDER BY a <-> '-179.0' LIMIT 3;
+
+CREATE INDEX float4idx ON float4tmp USING gist ( a );
+
+SET enable_seqscan=off;
+
+SELECT count(*) FROM float4tmp WHERE a <  -179.0::float4;
+
+SELECT count(*) FROM float4tmp WHERE a <= -179.0::float4;
+
+SELECT count(*) FROM float4tmp WHERE a  = -179.0::float4;
+
+SELECT count(*) FROM float4tmp WHERE a >= -179.0::float4;
+
+SELECT count(*) FROM float4tmp WHERE a >  -179.0::float4;
+
+EXPLAIN (COSTS OFF)
+SELECT a, a <-> '-179.0' FROM float4tmp ORDER BY a <-> '-179.0' LIMIT 3;
+SELECT a, a <-> '-179.0' FROM float4tmp ORDER BY a <-> '-179.0' LIMIT 3;
-- 
cgit v1.2.3

