diff --git a/contrib/btree_gist/expected/btree_gist.out b/contrib/btree_gist/expected/btree_gist.out
index eb67c2e7f73dfd08221a0547f712beb12f932d6c..06699383d71b4830b7b5cfc428205e269459e933 100644
--- a/contrib/btree_gist/expected/btree_gist.out
+++ b/contrib/btree_gist/expected/btree_gist.out
@@ -5,8 +5,8 @@
 \set ECHO none
 psql:btree_gist.sql:10: WARNING:  ProcedureCreate: type int4key is not yet defined
 psql:btree_gist.sql:15: WARNING:  Argument type "int4key" is only a shell
-psql:btree_gist.sql:76: WARNING:  ProcedureCreate: type tskey is not yet defined
-psql:btree_gist.sql:81: WARNING:  Argument type "tskey" is only a shell
+psql:btree_gist.sql:98: WARNING:  ProcedureCreate: type tskey is not yet defined
+psql:btree_gist.sql:103: WARNING:  Argument type "tskey" is only a shell
 CREATE TABLE inttmp (b int4);
 \copy inttmp from 'data/test_btree.data'
 CREATE TABLE tstmp ( t timestamp without time zone );
diff --git a/contrib/btree_gist/sql/btree_gist.sql b/contrib/btree_gist/sql/btree_gist.sql
index d6e564dda36b65e749ca83e42ffb1ebf85004a95..6c369b2aa0f2f2f42153c9f152739056b2f617f4 100644
--- a/contrib/btree_gist/sql/btree_gist.sql
+++ b/contrib/btree_gist/sql/btree_gist.sql
@@ -3,7 +3,6 @@
 -- does not depend on contents of seg.sql.
 --
 \set ECHO none
-SET autocommit TO 'on';
 \i btree_gist.sql
 \set ECHO all
 
diff --git a/contrib/cube/sql/cube.sql b/contrib/cube/sql/cube.sql
index 416833bd48b2055510bb19819b9847cd470616cf..a0712c555799f3cd23d2ecb0e664dd6a918114a8 100644
--- a/contrib/cube/sql/cube.sql
+++ b/contrib/cube/sql/cube.sql
@@ -7,7 +7,6 @@
 -- does not depend on contents of cube.sql.
 --
 \set ECHO none
-SET autocommit TO 'on';
 \i cube.sql
 \set ECHO all
 
diff --git a/contrib/dblink/expected/dblink.out b/contrib/dblink/expected/dblink.out
index 6b2d442972a5fa88e521473f21eadd547e287778..1f69ab1656bf34725f5e5f4eac163db799a60864 100644
--- a/contrib/dblink/expected/dblink.out
+++ b/contrib/dblink/expected/dblink.out
@@ -6,7 +6,6 @@
 --
 -- Adjust this setting to control where the objects get created.
 SET search_path = public;
-SET autocommit TO 'on';
 CREATE OR REPLACE FUNCTION conditional_drop()
 RETURNS text AS '
 DECLARE
diff --git a/contrib/dblink/sql/dblink.sql b/contrib/dblink/sql/dblink.sql
index e2e9a8178619d6fa478060b313de31d5ce3dac81..3e66467ed4782c1345d11406c45a28679f4f0604 100644
--- a/contrib/dblink/sql/dblink.sql
+++ b/contrib/dblink/sql/dblink.sql
@@ -8,8 +8,6 @@
 -- Adjust this setting to control where the objects get created.
 SET search_path = public;
 
-SET autocommit TO 'on';
-
 CREATE OR REPLACE FUNCTION conditional_drop()
 RETURNS text AS '
 DECLARE
diff --git a/contrib/earthdistance/sql/earthdistance.sql b/contrib/earthdistance/sql/earthdistance.sql
index d8c481beccb466922fca5829b849a462e2958358..f912110a885d21facb55ad0f311eca6dd26d22d1 100644
--- a/contrib/earthdistance/sql/earthdistance.sql
+++ b/contrib/earthdistance/sql/earthdistance.sql
@@ -7,7 +7,6 @@
 -- does not depend on contents of earthdistance.sql or cube.sql.
 --
 \set ECHO none
-SET autocommit TO 'on';
 \i earthdistance.sql
 \set ECHO all
 
diff --git a/contrib/intarray/sql/_int.sql b/contrib/intarray/sql/_int.sql
index 91db6d83447f373695cfcb59f3108b22e70d0378..cd05e4a785eb8a986cccf76c76bc4b757b6320bc 100644
--- a/contrib/intarray/sql/_int.sql
+++ b/contrib/intarray/sql/_int.sql
@@ -3,7 +3,6 @@
 -- does not depend on contents of seg.sql.
 --
 \set ECHO none
-SET autocommit TO 'on';
 \i _int.sql
 \set ECHO all
 
diff --git a/contrib/ltree/sql/ltree.sql b/contrib/ltree/sql/ltree.sql
index 0d9defcca49d3446c0addab1fd560aeafea14d3b..141bd43436069dfe2f9304c3bc45cba54562ae93 100644
--- a/contrib/ltree/sql/ltree.sql
+++ b/contrib/ltree/sql/ltree.sql
@@ -1,6 +1,4 @@
 \set ECHO none
-SET autocommit TO 'on';
-
 \i ltree.sql
 \set ECHO all
 
diff --git a/contrib/pgcrypto/expected/blowfish.out b/contrib/pgcrypto/expected/blowfish.out
index 1f2ccd82b4a029bfd1d5c33ead91d7306cde4322..5a13b7669ccfd2ea64a8dc9f3eabe8719971c6a1 100644
--- a/contrib/pgcrypto/expected/blowfish.out
+++ b/contrib/pgcrypto/expected/blowfish.out
@@ -1,7 +1,6 @@
 --
 -- Blowfish cipher
 --
-SET autocommit TO 'on';
 -- some standard Blowfish testvalues
 SELECT encode(encrypt(
 decode('0000000000000000', 'hex'),
diff --git a/contrib/pgcrypto/expected/crypt-blowfish.out b/contrib/pgcrypto/expected/crypt-blowfish.out
index 9b9297493134d31e430ff5d7c8cb273ac78907cf..329d78f6254621d3e1dedfe86afb8c0b18a03f3d 100644
--- a/contrib/pgcrypto/expected/crypt-blowfish.out
+++ b/contrib/pgcrypto/expected/crypt-blowfish.out
@@ -1,7 +1,6 @@
 --
 -- crypt() and gen_salt(): bcrypt
 --
-SET autocommit TO 'on';
 SELECT crypt('', '$2a$06$RQiOJ.3ELirrXwxIZY8q0O');
                             crypt                             
 --------------------------------------------------------------
diff --git a/contrib/pgcrypto/expected/crypt-des.out b/contrib/pgcrypto/expected/crypt-des.out
index 574a45bae7a70dd7e638db833f1d3d13fee97348..b8b605037d48b1b35fcda93fe66a735aa06122bc 100644
--- a/contrib/pgcrypto/expected/crypt-des.out
+++ b/contrib/pgcrypto/expected/crypt-des.out
@@ -1,7 +1,6 @@
 --
 -- crypt() and gen_salt(): crypt-des
 --
-SET autocommit TO 'on';
 SELECT crypt('', 'NB');
      crypt     
 ---------------
diff --git a/contrib/pgcrypto/expected/crypt-md5.out b/contrib/pgcrypto/expected/crypt-md5.out
index 545236d6542f8c5f2f2383215778121fcf0666c9..a1c8304adccad163ff02f5ad66ef7a74afcf517d 100644
--- a/contrib/pgcrypto/expected/crypt-md5.out
+++ b/contrib/pgcrypto/expected/crypt-md5.out
@@ -1,7 +1,6 @@
 --
 -- crypt() and gen_salt(): md5
 --
-SET autocommit TO 'on';
 SELECT crypt('', '$1$Szzz0yzz');
                crypt                
 ------------------------------------
diff --git a/contrib/pgcrypto/expected/crypt-xdes.out b/contrib/pgcrypto/expected/crypt-xdes.out
index b2593fc16be3e02e45f25eb945ae4d37ae31b54f..cdcdefb1996997f4a7f9b54f3efef46acd20b219 100644
--- a/contrib/pgcrypto/expected/crypt-xdes.out
+++ b/contrib/pgcrypto/expected/crypt-xdes.out
@@ -1,7 +1,6 @@
 --
 -- crypt() and gen_salt(): extended des
 --
-SET autocommit TO 'on';
 SELECT crypt('', '_J9..j2zz');
         crypt         
 ----------------------
diff --git a/contrib/pgcrypto/expected/hmac-md5.out b/contrib/pgcrypto/expected/hmac-md5.out
index dedd5afe711daaedb94be7e0c2ded5ea2896926d..9eded3b933bd2e30bd8a6bf63b4f9ca7a4345aa5 100644
--- a/contrib/pgcrypto/expected/hmac-md5.out
+++ b/contrib/pgcrypto/expected/hmac-md5.out
@@ -1,7 +1,6 @@
 --
 -- HMAC-MD5
 --
-SET autocommit TO 'on';
 SELECT encode(hmac(
 'Hi There',
 decode('0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b', 'hex'),
diff --git a/contrib/pgcrypto/expected/hmac-sha1.out b/contrib/pgcrypto/expected/hmac-sha1.out
index 4ccb0f101b138e3850ba8529201c644faf511a2c..d5f1cf259720e8e349fc5f4221da374dabf10490 100644
--- a/contrib/pgcrypto/expected/hmac-sha1.out
+++ b/contrib/pgcrypto/expected/hmac-sha1.out
@@ -1,7 +1,6 @@
 --
 -- HMAC-MD5
 --
-SET autocommit TO 'on';
 SELECT encode(hmac(
 'Hi There',
 decode('0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b', 'hex'),
diff --git a/contrib/pgcrypto/expected/md5.out b/contrib/pgcrypto/expected/md5.out
index 70933c9a7361f32a118f815875140d0723a6ac9c..e3301af45c5fe2d6312fc62425b4777755375e36 100644
--- a/contrib/pgcrypto/expected/md5.out
+++ b/contrib/pgcrypto/expected/md5.out
@@ -1,7 +1,6 @@
 --
 -- MD5 message digest
 --
-SET autocommit TO 'on';
 SELECT encode(digest('', 'md5'), 'hex');
               encode              
 ----------------------------------
diff --git a/contrib/pgcrypto/expected/rijndael.out b/contrib/pgcrypto/expected/rijndael.out
index 18ade2025be4c9f59d8f146cf23b0c3963ed8be2..a5dc8ce6200b6cd401fe9f9b021fa17a5e330286 100644
--- a/contrib/pgcrypto/expected/rijndael.out
+++ b/contrib/pgcrypto/expected/rijndael.out
@@ -1,7 +1,6 @@
 --
 -- AES / Rijndael-128 cipher
 --
-SET autocommit TO 'on';
 -- some standard Rijndael testvalues
 SELECT encode(encrypt(
 decode('00112233445566778899aabbccddeeff', 'hex'),
diff --git a/contrib/pgcrypto/expected/sha1.out b/contrib/pgcrypto/expected/sha1.out
index af86171d88ed28ce42e7c4cb20357ae273461760..9324d5d924f6e3c412b64facdcac6bde4aa9da5c 100644
--- a/contrib/pgcrypto/expected/sha1.out
+++ b/contrib/pgcrypto/expected/sha1.out
@@ -1,7 +1,6 @@
 --
 -- SHA1 message digest
 --
-SET autocommit TO 'on';
 SELECT encode(digest('', 'sha1'), 'hex');
                   encode                  
 ------------------------------------------
diff --git a/contrib/pgcrypto/sql/blowfish.sql b/contrib/pgcrypto/sql/blowfish.sql
index 93187dcba3175f78d20bb12d96598ebc4f018d98..e5f6ddccf361b1ae73a16aaff4f5e6a79ea255e6 100644
--- a/contrib/pgcrypto/sql/blowfish.sql
+++ b/contrib/pgcrypto/sql/blowfish.sql
@@ -2,8 +2,6 @@
 -- Blowfish cipher
 --
 
-SET autocommit TO 'on';
-
 -- some standard Blowfish testvalues
 SELECT encode(encrypt(
 decode('0000000000000000', 'hex'),
diff --git a/contrib/pgcrypto/sql/crypt-blowfish.sql b/contrib/pgcrypto/sql/crypt-blowfish.sql
index 5128675e0c929bc012dfafb7bb55138d3aeb66cf..effc18662058b3ec5b913e3c29470b5391a7093d 100644
--- a/contrib/pgcrypto/sql/crypt-blowfish.sql
+++ b/contrib/pgcrypto/sql/crypt-blowfish.sql
@@ -2,8 +2,6 @@
 -- crypt() and gen_salt(): bcrypt
 --
 
-SET autocommit TO 'on';
-
 SELECT crypt('', '$2a$06$RQiOJ.3ELirrXwxIZY8q0O');
 
 SELECT crypt('foox', '$2a$06$RQiOJ.3ELirrXwxIZY8q0O');
diff --git a/contrib/pgcrypto/sql/crypt-des.sql b/contrib/pgcrypto/sql/crypt-des.sql
index ff43112dd82ac79a786fc9dd2ed9d256ae600ca3..b13d2f9de71a7e0d68eafd9ff4abd2a2b75cee11 100644
--- a/contrib/pgcrypto/sql/crypt-des.sql
+++ b/contrib/pgcrypto/sql/crypt-des.sql
@@ -2,8 +2,6 @@
 -- crypt() and gen_salt(): crypt-des
 --
 
-SET autocommit TO 'on';
-
 SELECT crypt('', 'NB');
 
 SELECT crypt('foox', 'NB');
diff --git a/contrib/pgcrypto/sql/crypt-md5.sql b/contrib/pgcrypto/sql/crypt-md5.sql
index c570e4ab7a7b8aee9980ece95996839c0084c397..0002f0d34d72b6be6450357feb145c50484e959b 100644
--- a/contrib/pgcrypto/sql/crypt-md5.sql
+++ b/contrib/pgcrypto/sql/crypt-md5.sql
@@ -2,8 +2,6 @@
 -- crypt() and gen_salt(): md5
 --
 
-SET autocommit TO 'on';
-
 SELECT crypt('', '$1$Szzz0yzz');
 
 SELECT crypt('foox', '$1$Szzz0yzz');
diff --git a/contrib/pgcrypto/sql/crypt-xdes.sql b/contrib/pgcrypto/sql/crypt-xdes.sql
index c6205ab6008747e6ec40da3366384532776d0797..51271dba6da8e718ba821798d6287a19c8edf88d 100644
--- a/contrib/pgcrypto/sql/crypt-xdes.sql
+++ b/contrib/pgcrypto/sql/crypt-xdes.sql
@@ -2,8 +2,6 @@
 -- crypt() and gen_salt(): extended des
 --
 
-SET autocommit TO 'on';
-
 SELECT crypt('', '_J9..j2zz');
 
 SELECT crypt('foox', '_J9..j2zz');
diff --git a/contrib/pgcrypto/sql/hmac-md5.sql b/contrib/pgcrypto/sql/hmac-md5.sql
index ed2b65b7b8d5b4df60e26cbecadf1bf1ef85688f..70bef7cd505762e338e35a8170cb023899d1eb59 100644
--- a/contrib/pgcrypto/sql/hmac-md5.sql
+++ b/contrib/pgcrypto/sql/hmac-md5.sql
@@ -2,8 +2,6 @@
 -- HMAC-MD5
 --
 
-SET autocommit TO 'on';
-
 SELECT encode(hmac(
 'Hi There',
 decode('0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b', 'hex'),
diff --git a/contrib/pgcrypto/sql/hmac-sha1.sql b/contrib/pgcrypto/sql/hmac-sha1.sql
index fb70424dcebaadd36121ea5cf6794108a8c885a7..4adf6ed086389655b25e147cd86b0fa8eb813ef9 100644
--- a/contrib/pgcrypto/sql/hmac-sha1.sql
+++ b/contrib/pgcrypto/sql/hmac-sha1.sql
@@ -2,8 +2,6 @@
 -- HMAC-MD5
 --
 
-SET autocommit TO 'on';
-
 SELECT encode(hmac(
 'Hi There',
 decode('0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b', 'hex'),
diff --git a/contrib/pgcrypto/sql/init.sql b/contrib/pgcrypto/sql/init.sql
index 08ffeb4981400c85dc86c4bcfc47a3423bfe9340..9d38cb5854085f078964047679d82baf73d3df42 100644
--- a/contrib/pgcrypto/sql/init.sql
+++ b/contrib/pgcrypto/sql/init.sql
@@ -3,7 +3,6 @@
 --
 
 \set ECHO none
-SET autocommit TO 'on';
 \i pgcrypto.sql
 \set ECHO all
 
diff --git a/contrib/pgcrypto/sql/md5.sql b/contrib/pgcrypto/sql/md5.sql
index 0c851217b209cc2bda825dc1ade760779592e3a3..d6e502779af20a7e85e82998ed10e330e7d37b1e 100644
--- a/contrib/pgcrypto/sql/md5.sql
+++ b/contrib/pgcrypto/sql/md5.sql
@@ -2,8 +2,6 @@
 -- MD5 message digest
 --
 
-SET autocommit TO 'on';
-
 SELECT encode(digest('', 'md5'), 'hex');
 SELECT encode(digest('a', 'md5'), 'hex');
 SELECT encode(digest('abc', 'md5'), 'hex');
diff --git a/contrib/pgcrypto/sql/rijndael.sql b/contrib/pgcrypto/sql/rijndael.sql
index 793b07f362eec4bbaa7ae999d18d71bf91377a6f..6f3dfc96227ffc6c161169ede37a66f7e54d5f97 100644
--- a/contrib/pgcrypto/sql/rijndael.sql
+++ b/contrib/pgcrypto/sql/rijndael.sql
@@ -2,8 +2,6 @@
 -- AES / Rijndael-128 cipher
 --
 
-SET autocommit TO 'on';
-
 -- some standard Rijndael testvalues
 SELECT encode(encrypt(
 decode('00112233445566778899aabbccddeeff', 'hex'),
diff --git a/contrib/pgcrypto/sql/sha1.sql b/contrib/pgcrypto/sql/sha1.sql
index 1c0fcd90721636e051a3dd3f0932225c0627e4a5..6a398b411eb4999ca60b03965df61a5691988d7e 100644
--- a/contrib/pgcrypto/sql/sha1.sql
+++ b/contrib/pgcrypto/sql/sha1.sql
@@ -2,8 +2,6 @@
 -- SHA1 message digest
 --
 
-SET autocommit TO 'on';
-
 SELECT encode(digest('', 'sha1'), 'hex');
 SELECT encode(digest('a', 'sha1'), 'hex');
 SELECT encode(digest('abc', 'sha1'), 'hex');
diff --git a/contrib/rtree_gist/sql/rtree_gist.sql b/contrib/rtree_gist/sql/rtree_gist.sql
index 161abae1edd67dd4a2d4b4737c8e32b2f254ed6a..73435c0b3de4beb86679ecbc5c714abef0f318b0 100644
--- a/contrib/rtree_gist/sql/rtree_gist.sql
+++ b/contrib/rtree_gist/sql/rtree_gist.sql
@@ -3,7 +3,6 @@
 -- does not depend on contents of seg.sql.
 --
 \set ECHO none
-SET autocommit TO 'on';
 \i rtree_gist.sql
 \set ECHO all
 
diff --git a/contrib/seg/sql/seg.sql b/contrib/seg/sql/seg.sql
index 6614ead0c592453575905a30b81d9aefc9e8793c..95394c95d04a0935d86f024b7c4741daba0bea52 100644
--- a/contrib/seg/sql/seg.sql
+++ b/contrib/seg/sql/seg.sql
@@ -7,7 +7,6 @@
 -- does not depend on contents of seg.sql.
 --
 \set ECHO none
-SET autocommit TO 'on';
 \i seg.sql
 \set ECHO all
 
diff --git a/contrib/tablefunc/sql/tablefunc.sql b/contrib/tablefunc/sql/tablefunc.sql
index 4c1da066878b6363df06322b81ef356b866236b6..bafed1e5c3406427d7cc7bb5b99c0f841b8162eb 100644
--- a/contrib/tablefunc/sql/tablefunc.sql
+++ b/contrib/tablefunc/sql/tablefunc.sql
@@ -3,7 +3,6 @@
 -- does not depend on contents of tablefunc.sql.
 --
 \set ECHO none
-SET autocommit TO 'on';
 \i tablefunc.sql
 \set ECHO all
 
diff --git a/contrib/tsearch/sql/tsearch.sql b/contrib/tsearch/sql/tsearch.sql
index 5b0b50afcabf9a5143024b5b93b2a80c6c45fd32..70ab3a3b007d67e0cca0db9e59e8b0f84b7c2dc4 100644
--- a/contrib/tsearch/sql/tsearch.sql
+++ b/contrib/tsearch/sql/tsearch.sql
@@ -3,7 +3,6 @@
 -- does not depend on contents of seg.sql.
 --
 \set ECHO none
-SET autocommit TO 'on';
 \i tsearch.sql
 \set ECHO all