From aa4c702eac936964649f905741b4a99f4b489200 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Fri, 18 Oct 2002 18:41:22 +0000
Subject: Update /contrib for "autocommit TO 'on'".

Create objects in public schema.

Make spacing/capitalization consistent.

Remove transaction block use for object creation.

Remove unneeded function GRANTs.
---
 contrib/rtree_gist/sql/rtree_gist.sql | 38 ++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 14 deletions(-)

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

diff --git a/contrib/rtree_gist/sql/rtree_gist.sql b/contrib/rtree_gist/sql/rtree_gist.sql
index 7a2a7faf85..161abae1ed 100644
--- a/contrib/rtree_gist/sql/rtree_gist.sql
+++ b/contrib/rtree_gist/sql/rtree_gist.sql
@@ -3,36 +3,46 @@
 -- does not depend on contents of seg.sql.
 --
 \set ECHO none
+SET autocommit TO 'on';
 \i rtree_gist.sql
 \set ECHO all
 
-create table boxtmp (b box);
+CREATE TABLE boxtmp (b box);
 
 \copy boxtmp from 'data/test_box.data'
 
-select count(*) from boxtmp where b && '(1000,1000,0,0)'::box;
+SELECT count(*)
+FROM boxtmp
+WHERE b && '(1000,1000,0,0)'::box;
 
-create index bix on boxtmp using rtree (b);
+CREATE INDEX bix ON boxtmp USING rtree (b);
 
-select count(*) from boxtmp where b && '(1000,1000,0,0)'::box;
+SELECT count(*)
+FROM boxtmp
+WHERE b && '(1000,1000,0,0)'::box;
 
-drop index bix;
+DROP INDEX bix;
 
-create index bix on boxtmp using gist (b);
+CREATE INDEX bix ON boxtmp USING gist (b);
 
-select count(*) from boxtmp where b && '(1000,1000,0,0)'::box;
+SELECT count(*)
+FROM boxtmp
+WHERE b && '(1000,1000,0,0)'::box;
 
-create table polytmp (p polygon);
+CREATE TABLE polytmp (p polygon);
 
 \copy polytmp from 'data/test_box.data'
 
-create index pix on polytmp using rtree (p);
+CREATE INDEX pix ON polytmp USING rtree (p);
 
-select count(*) from polytmp where p && '(1000,1000),(0,0)'::polygon;
+SELECT count(*)
+FROM polytmp
+WHERE p && '(1000,1000),(0,0)'::polygon;
 
-drop index pix;
+DROP INDEX pix;
 
-create index pix on polytmp using gist (p);
-
-select count(*) from polytmp where p && '(1000,1000),(0,0)'::polygon;
+CREATE INDEX pix ON polytmp USING gist (p);
 
+SELECT count(*)
+FROM polytmp
+WHERE p && '(1000,1000),(0,0)'::polygon;
-- 
cgit v1.2.1

