From 4efbbd731899df673cab4415b9111744d9537a62 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Wed, 19 Feb 2003 03:46:00 +0000
Subject: We just released new version of contrib/btree_gist (7.3 and current
 CVS) with support of int8, float4, float8 in addition to int4. Thanks Janko
 Richter for contribution.

Oleg Bartunov
---
 contrib/btree_gist/sql/btree_gist.sql | 42 ++++++++++++++++++++++++++++++-----
 1 file changed, 36 insertions(+), 6 deletions(-)

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

diff --git a/contrib/btree_gist/sql/btree_gist.sql b/contrib/btree_gist/sql/btree_gist.sql
index 6c369b2aa0f..b3f310a790c 100644
--- a/contrib/btree_gist/sql/btree_gist.sql
+++ b/contrib/btree_gist/sql/btree_gist.sql
@@ -1,14 +1,26 @@
 --
 -- first, define the datatype.  Turn off echoing so that expected file
--- does not depend on contents of seg.sql.
+-- does not depend on contents of btree_gist.sql.
 --
 \set ECHO none
 \i btree_gist.sql
 \set ECHO all
 
-CREATE TABLE inttmp (b int4);
+CREATE TABLE int4tmp (b int4);
 
-\copy inttmp from 'data/test_btree.data'
+\copy int4tmp from 'data/test_btree.data'
+
+CREATE TABLE int8tmp (b int8);
+
+\copy int8tmp from 'data/test_btree.data'
+
+CREATE TABLE float4tmp (b float4);
+
+\copy float4tmp from 'data/test_btree.data'
+
+CREATE TABLE float8tmp (b float8);
+
+\copy float8tmp from 'data/test_btree.data'
 
 CREATE TABLE tstmp ( t timestamp without time zone );
 
@@ -16,13 +28,25 @@ CREATE TABLE tstmp ( t timestamp without time zone );
 
 -- without idx
 
-SELECT count(*) FROM inttmp WHERE b <=10;
+SELECT count(*) FROM int4tmp WHERE b <=10;
+
+SELECT count(*) FROM int8tmp WHERE b <=10;
+
+SELECT count(*) FROM float4tmp WHERE b <=10;
+
+SELECT count(*) FROM float8tmp WHERE b <=10;
 
 SELECT count(*) FROM tstmp WHERE t < '2001-05-29 08:33:09';
 
 -- create idx
 
-CREATE INDEX aaaidx ON inttmp USING gist ( b );
+CREATE INDEX aaaidx ON int4tmp USING gist ( b );
+
+CREATE INDEX bbbidx ON int8tmp USING gist ( b );
+
+CREATE INDEX cccidx ON float4tmp USING gist ( b );
+
+CREATE INDEX dddidx ON float8tmp USING gist ( b );
 
 CREATE INDEX tsidx ON tstmp USING gist ( t );
 
@@ -30,7 +54,13 @@ CREATE INDEX tsidx ON tstmp USING gist ( t );
 
 SET enable_seqscan=off;
 
-SELECT count(*) FROM inttmp WHERE b <=10;
+SELECT count(*) FROM int4tmp WHERE b <=10::int4;
+
+SELECT count(*) FROM int8tmp WHERE b <=10::int8;
+
+SELECT count(*) FROM float4tmp WHERE b <=10::float4;
+
+SELECT count(*) FROM float8tmp WHERE b <=10::float8;
 
 SELECT count(*) FROM tstmp WHERE t < '2001-05-29 08:33:09';
 
-- 
cgit v1.2.3

