mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Backend support for autocommit removed, per recent discussions. The
only remnant of this failed experiment is that the server will take SET AUTOCOMMIT TO ON. Still TODO: provide some client-side autocommit logic in libpq.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: adddepend,v 1.3 2002/12/02 00:28:29 tgl Exp $
|
||||
# $Id: adddepend,v 1.4 2003/05/14 03:25:55 tgl Exp $
|
||||
|
||||
# Project exists to assist PostgreSQL users with their structural upgrade
|
||||
# from 7.2 (or prior) to 7.3 (possibly later). Must be run against a 7.3
|
||||
@ -125,20 +125,13 @@ my $dbh = DBI->connect($dsn, $dbuser, $dbpass);
|
||||
# We want to control commits
|
||||
$dbh->{'AutoCommit'} = 0;
|
||||
|
||||
# turn on autocommit
|
||||
# control where things get created
|
||||
my $sql = qq{
|
||||
SET search_path = public;
|
||||
};
|
||||
my $sth = $dbh->prepare($sql);
|
||||
$sth->execute();
|
||||
|
||||
# turn on autocommit
|
||||
my $sql2 = qq{
|
||||
SET autocommit TO 'on';
|
||||
};
|
||||
my $sth2 = $dbh->prepare($sql2);
|
||||
$sth2->execute();
|
||||
|
||||
END {
|
||||
$dbh->disconnect() if $dbh;
|
||||
}
|
||||
|
@ -6,8 +6,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION array_texteq(_text, text)
|
||||
RETURNS bool
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
-- create type of int2 key
|
||||
CREATE FUNCTION int2key_in(cstring)
|
||||
RETURNS int2key
|
||||
|
@ -3,18 +3,18 @@
|
||||
-- does not depend on contents of btree_gist.sql.
|
||||
--
|
||||
\set ECHO none
|
||||
psql:btree_gist.sql:10: NOTICE: ProcedureCreate: type int2key is not yet defined
|
||||
psql:btree_gist.sql:15: NOTICE: Argument type "int2key" is only a shell
|
||||
psql:btree_gist.sql:27: NOTICE: ProcedureCreate: type int4key is not yet defined
|
||||
psql:btree_gist.sql:32: NOTICE: Argument type "int4key" is only a shell
|
||||
psql:btree_gist.sql:44: NOTICE: ProcedureCreate: type int8key is not yet defined
|
||||
psql:btree_gist.sql:49: NOTICE: Argument type "int8key" is only a shell
|
||||
psql:btree_gist.sql:61: NOTICE: ProcedureCreate: type float4key is not yet defined
|
||||
psql:btree_gist.sql:66: NOTICE: Argument type "float4key" is only a shell
|
||||
psql:btree_gist.sql:79: NOTICE: ProcedureCreate: type float8key is not yet defined
|
||||
psql:btree_gist.sql:84: NOTICE: Argument type "float8key" is only a shell
|
||||
psql:btree_gist.sql:394: NOTICE: ProcedureCreate: type tskey is not yet defined
|
||||
psql:btree_gist.sql:399: NOTICE: Argument type "tskey" is only a shell
|
||||
psql:btree_gist.sql:8: NOTICE: ProcedureCreate: type int2key is not yet defined
|
||||
psql:btree_gist.sql:13: NOTICE: Argument type "int2key" is only a shell
|
||||
psql:btree_gist.sql:25: NOTICE: ProcedureCreate: type int4key is not yet defined
|
||||
psql:btree_gist.sql:30: NOTICE: Argument type "int4key" is only a shell
|
||||
psql:btree_gist.sql:42: NOTICE: ProcedureCreate: type int8key is not yet defined
|
||||
psql:btree_gist.sql:47: NOTICE: Argument type "int8key" is only a shell
|
||||
psql:btree_gist.sql:59: NOTICE: ProcedureCreate: type float4key is not yet defined
|
||||
psql:btree_gist.sql:64: NOTICE: Argument type "float4key" is only a shell
|
||||
psql:btree_gist.sql:77: NOTICE: ProcedureCreate: type float8key is not yet defined
|
||||
psql:btree_gist.sql:82: NOTICE: Argument type "float8key" is only a shell
|
||||
psql:btree_gist.sql:392: NOTICE: ProcedureCreate: type tskey is not yet defined
|
||||
psql:btree_gist.sql:397: NOTICE: Argument type "tskey" is only a shell
|
||||
CREATE TABLE int4tmp (b int4);
|
||||
\copy int4tmp from 'data/test_btree.data'
|
||||
CREATE TABLE int8tmp (b int8);
|
||||
|
@ -4,7 +4,7 @@
|
||||
-- darcy@druid.net
|
||||
-- http://www.druid.net/darcy/
|
||||
--
|
||||
-- $Header: /cvsroot/pgsql/contrib/chkpass/chkpass.sql.in,v 1.3 2002/10/18 18:41:19 momjian Exp $
|
||||
-- $Header: /cvsroot/pgsql/contrib/chkpass/chkpass.sql.in,v 1.4 2003/05/14 03:25:55 tgl Exp $
|
||||
--
|
||||
-- best viewed with tabs set to 4
|
||||
--
|
||||
@ -16,8 +16,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE FUNCTION chkpass_in(cstring)
|
||||
RETURNS chkpass
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -4,8 +4,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION cube_in(cstring)
|
||||
RETURNS cube
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -6,8 +6,8 @@
|
||||
-- does not depend on contents of cube.sql.
|
||||
--
|
||||
\set ECHO none
|
||||
psql:cube.sql:12: NOTICE: ProcedureCreate: type cube is not yet defined
|
||||
psql:cube.sql:17: NOTICE: Argument type "cube" is only a shell
|
||||
psql:cube.sql:10: NOTICE: ProcedureCreate: type cube is not yet defined
|
||||
psql:cube.sql:15: NOTICE: Argument type "cube" is only a shell
|
||||
--
|
||||
-- testing the input and output functions
|
||||
--
|
||||
|
@ -861,8 +861,6 @@ main(int argc, char **argv)
|
||||
|
||||
PQexec(conn, "SET search_path = public");
|
||||
|
||||
PQexec(conn, "SET autocommit TO 'on'");
|
||||
|
||||
/* Substitute field names */
|
||||
do_substitute(subarg, dbh);
|
||||
|
||||
|
@ -190,7 +190,7 @@ WHERE t.a > 7;
|
||||
ERROR: dblink: no connection available
|
||||
-- put more data into our slave table, first using arbitrary connection syntax
|
||||
-- but truncate the actual return value so we can use diff to check for success
|
||||
SELECT substr(dblink_exec('dbname=regression','SET autocommit TO ''on'';INSERT INTO foo VALUES(10,''k'',''{"a10","b10","c10"}'')'),1,6);
|
||||
SELECT substr(dblink_exec('dbname=regression','INSERT INTO foo VALUES(10,''k'',''{"a10","b10","c10"}'')'),1,6);
|
||||
substr
|
||||
--------
|
||||
INSERT
|
||||
@ -205,7 +205,7 @@ SELECT dblink_connect('dbname=regression');
|
||||
|
||||
-- put more data into our slave table, using persistent connection syntax
|
||||
-- but truncate the actual return value so we can use diff to check for success
|
||||
SELECT substr(dblink_exec('SET autocommit TO ''on'';INSERT INTO foo VALUES(11,''l'',''{"a11","b11","c11"}'')'),1,6);
|
||||
SELECT substr(dblink_exec('INSERT INTO foo VALUES(11,''l'',''{"a11","b11","c11"}'')'),1,6);
|
||||
substr
|
||||
--------
|
||||
INSERT
|
||||
@ -231,7 +231,7 @@ FROM dblink('SELECT * FROM foo') AS t(a int, b text, c text[]);
|
||||
(12 rows)
|
||||
|
||||
-- change some data
|
||||
SELECT dblink_exec('SET autocommit TO ''on'';UPDATE foo SET f3[2] = ''b99'' WHERE f1 = 11');
|
||||
SELECT dblink_exec('UPDATE foo SET f3[2] = ''b99'' WHERE f1 = 11');
|
||||
dblink_exec
|
||||
-------------
|
||||
UPDATE 1
|
||||
@ -247,7 +247,7 @@ WHERE a = 11;
|
||||
(1 row)
|
||||
|
||||
-- delete some data
|
||||
SELECT dblink_exec('SET autocommit TO ''on'';DELETE FROM foo WHERE f1 = 11');
|
||||
SELECT dblink_exec('DELETE FROM foo WHERE f1 = 11');
|
||||
dblink_exec
|
||||
-------------
|
||||
DELETE 1
|
||||
|
@ -8,7 +8,6 @@ SET search_path = public;
|
||||
-- Turn off echoing so that expected file does not depend on
|
||||
-- contents of dblink.sql.
|
||||
\set ECHO none
|
||||
SET autocommit TO 'on';
|
||||
\i dblink.sql
|
||||
\set ECHO all
|
||||
|
||||
@ -113,21 +112,21 @@ WHERE t.a > 7;
|
||||
|
||||
-- put more data into our slave table, first using arbitrary connection syntax
|
||||
-- but truncate the actual return value so we can use diff to check for success
|
||||
SELECT substr(dblink_exec('dbname=regression','SET autocommit TO ''on'';INSERT INTO foo VALUES(10,''k'',''{"a10","b10","c10"}'')'),1,6);
|
||||
SELECT substr(dblink_exec('dbname=regression','INSERT INTO foo VALUES(10,''k'',''{"a10","b10","c10"}'')'),1,6);
|
||||
|
||||
-- create a persistent connection
|
||||
SELECT dblink_connect('dbname=regression');
|
||||
|
||||
-- put more data into our slave table, using persistent connection syntax
|
||||
-- but truncate the actual return value so we can use diff to check for success
|
||||
SELECT substr(dblink_exec('SET autocommit TO ''on'';INSERT INTO foo VALUES(11,''l'',''{"a11","b11","c11"}'')'),1,6);
|
||||
SELECT substr(dblink_exec('INSERT INTO foo VALUES(11,''l'',''{"a11","b11","c11"}'')'),1,6);
|
||||
|
||||
-- let's see it
|
||||
SELECT *
|
||||
FROM dblink('SELECT * FROM foo') AS t(a int, b text, c text[]);
|
||||
|
||||
-- change some data
|
||||
SELECT dblink_exec('SET autocommit TO ''on'';UPDATE foo SET f3[2] = ''b99'' WHERE f1 = 11');
|
||||
SELECT dblink_exec('UPDATE foo SET f3[2] = ''b99'' WHERE f1 = 11');
|
||||
|
||||
-- let's see it
|
||||
SELECT *
|
||||
@ -135,7 +134,7 @@ FROM dblink('SELECT * FROM foo') AS t(a int, b text, c text[])
|
||||
WHERE a = 11;
|
||||
|
||||
-- delete some data
|
||||
SELECT dblink_exec('SET autocommit TO ''on'';DELETE FROM foo WHERE f1 = 11');
|
||||
SELECT dblink_exec('DELETE FROM foo WHERE f1 = 11');
|
||||
|
||||
-- let's see it
|
||||
SELECT *
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE TRIGGER "MyTableName_Trig"
|
||||
AFTER INSERT OR DELETE OR UPDATE ON "MyTableName"
|
||||
FOR EACH ROW EXECUTE PROCEDURE "recordchange" ();
|
||||
|
@ -33,7 +33,7 @@
|
||||
#
|
||||
#
|
||||
##############################################################################
|
||||
# $Id: DBMirror.pl,v 1.5 2002/12/05 21:03:51 momjian Exp $
|
||||
# $Id: DBMirror.pl,v 1.6 2003/05/14 03:25:55 tgl Exp $
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@ -135,15 +135,6 @@ sub Main() {
|
||||
die;
|
||||
}
|
||||
|
||||
my $setQuery2;
|
||||
$setQuery2 = "SET autocommit TO 'on'";
|
||||
my $setResult2 = $masterConn->exec($setQuery2);
|
||||
if($setResult2->resultStatus!=PGRES_COMMAND_OK) {
|
||||
logErrorMessage($masterConn->errorMessage . "\n" .
|
||||
$setQuery2);
|
||||
die;
|
||||
}
|
||||
|
||||
my $firstTime = 1;
|
||||
while(1) {
|
||||
if($firstTime == 0) {
|
||||
@ -158,7 +149,6 @@ sub Main() {
|
||||
|
||||
|
||||
|
||||
sendQueryToSlaves(undef,"SET autocommit TO 'on'");
|
||||
sendQueryToSlaves(undef,"SET TRANSACTION ISOLATION LEVEL SERIALIZABLE");
|
||||
sendQueryToSlaves(undef,"SET CONSTRAINTS ALL DEFERRED");
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE FUNCTION "recordchange" () RETURNS trigger AS
|
||||
'/usr/local/pgsql/lib/pending.so', 'recordchange' LANGUAGE 'C';
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
##############################################################################
|
||||
# $Id: clean_pending.pl,v 1.2 2002/10/18 18:41:19 momjian Exp $
|
||||
# $Id: clean_pending.pl,v 1.3 2003/05/14 03:25:55 tgl Exp $
|
||||
##############################################################################
|
||||
|
||||
|
||||
@ -69,10 +69,6 @@ unless($dbConn->status == PGRES_CONNECTION_OK) {
|
||||
printf("Can't connect to database\n");
|
||||
die;
|
||||
}
|
||||
my $setresult = $dbConn->exec("SET autocommit TO 'on'");
|
||||
unless($setresult->resultStatus == PGRES_COMMAND_OK) {
|
||||
die $dbConn->errorMessage;
|
||||
}
|
||||
my $result = $dbConn->exec("BEGIN");
|
||||
unless($result->resultStatus == PGRES_COMMAND_OK) {
|
||||
die $dbConn->errorMessage;
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
-- The earth functions rely on contrib/cube having been installed and loaded.
|
||||
|
||||
-- earth() returns the radius of the earth in meters. This is the only
|
||||
|
@ -6,8 +6,8 @@
|
||||
-- does not depend on contents of earthdistance.sql or cube.sql.
|
||||
--
|
||||
\set ECHO none
|
||||
psql:../cube/cube.sql:12: NOTICE: ProcedureCreate: type cube is not yet defined
|
||||
psql:../cube/cube.sql:17: NOTICE: Argument type "cube" is only a shell
|
||||
psql:../cube/cube.sql:10: NOTICE: ProcedureCreate: type cube is not yet defined
|
||||
psql:../cube/cube.sql:15: NOTICE: Argument type "cube" is only a shell
|
||||
--
|
||||
-- The radius of the Earth we are using.
|
||||
--
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright 2002 by PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/findoidjoins.c,v 1.19 2002/10/18 18:41:20 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/contrib/findoidjoins/Attic/findoidjoins.c,v 1.20 2003/05/14 03:25:56 tgl Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
|
||||
@ -49,7 +49,6 @@ main(int argc, char **argv)
|
||||
|
||||
appendPQExpBuffer(&sql, "%s",
|
||||
"SET search_path = public;"
|
||||
"SET autocommit TO 'on';"
|
||||
"SELECT c.relname, (SELECT nspname FROM "
|
||||
"pg_catalog.pg_namespace n WHERE n.oid = c.relnamespace) AS nspname "
|
||||
"FROM pg_catalog.pg_class c "
|
||||
|
@ -167,7 +167,6 @@ sub main {
|
||||
}
|
||||
|
||||
PQexec($PG_CONN, "SET search_path = public");
|
||||
PQexec($PG_CONN, "SET autocommit TO 'on'");
|
||||
PQexec($PG_CONN, "begin");
|
||||
|
||||
$query = "declare C cursor for select (\"";
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION fti() RETURNS trigger AS
|
||||
'MODULE_PATHNAME', 'fti'
|
||||
LANGUAGE 'C' VOLATILE CALLED ON NULL INPUT;
|
||||
|
@ -1,6 +1,4 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
DROP FUNCTION fti() CASCADE;
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE FUNCTION levenshtein (text,text)
|
||||
RETURNS int
|
||||
AS 'MODULE_PATHNAME','levenshtein'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
-- Internal function for the aggregate
|
||||
-- Is called for each item in an aggregation
|
||||
CREATE OR REPLACE FUNCTION int_agg_state (int4, int4)
|
||||
|
@ -6,8 +6,6 @@
|
||||
-- opclasses get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
-- Query type
|
||||
CREATE FUNCTION bqarr_in(cstring)
|
||||
RETURNS query_int
|
||||
|
@ -3,8 +3,8 @@
|
||||
-- does not depend on contents of seg.sql.
|
||||
--
|
||||
\set ECHO none
|
||||
psql:_int.sql:15: NOTICE: ProcedureCreate: type query_int is not yet defined
|
||||
psql:_int.sql:20: NOTICE: Argument type "query_int" is only a shell
|
||||
psql:_int.sql:13: NOTICE: ProcedureCreate: type query_int is not yet defined
|
||||
psql:_int.sql:18: NOTICE: Argument type "query_int" is only a shell
|
||||
SELECT intset(1234);
|
||||
intset
|
||||
--------
|
||||
|
@ -1,14 +1,12 @@
|
||||
--
|
||||
-- PostgreSQL code for ISSNs.
|
||||
--
|
||||
-- $Id: isbn_issn.sql.in,v 1.7 2002/10/18 18:41:20 momjian Exp $
|
||||
-- $Id: isbn_issn.sql.in,v 1.8 2003/05/14 03:25:56 tgl Exp $
|
||||
--
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
--
|
||||
-- Input and output functions and the type itself:
|
||||
--
|
||||
@ -124,7 +122,7 @@ CREATE OPERATOR <> (
|
||||
--
|
||||
-- PostgreSQL code for ISBNs.
|
||||
--
|
||||
-- $Id: isbn_issn.sql.in,v 1.7 2002/10/18 18:41:20 momjian Exp $
|
||||
-- $Id: isbn_issn.sql.in,v 1.8 2003/05/14 03:25:56 tgl Exp $
|
||||
--
|
||||
--
|
||||
-- Input and output functions and the type itself:
|
||||
|
@ -1,7 +1,7 @@
|
||||
--
|
||||
-- PostgreSQL code for LargeObjects
|
||||
--
|
||||
-- $Id: lo.sql.in,v 1.9 2002/12/31 10:22:03 inoue Exp $
|
||||
-- $Id: lo.sql.in,v 1.10 2003/05/14 03:25:56 tgl Exp $
|
||||
--
|
||||
--
|
||||
-- Create the data type
|
||||
@ -12,8 +12,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE FUNCTION lo_in(cstring)
|
||||
RETURNS lo
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -6,8 +6,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
-- remove our test table
|
||||
DROP TABLE a;
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
\set ECHO none
|
||||
psql:ltree.sql:9: NOTICE: ProcedureCreate: type ltree is not yet defined
|
||||
psql:ltree.sql:14: NOTICE: Argument type "ltree" is only a shell
|
||||
psql:ltree.sql:301: NOTICE: ProcedureCreate: type lquery is not yet defined
|
||||
psql:ltree.sql:306: NOTICE: Argument type "lquery" is only a shell
|
||||
psql:ltree.sql:412: NOTICE: ProcedureCreate: type ltxtquery is not yet defined
|
||||
psql:ltree.sql:417: NOTICE: Argument type "ltxtquery" is only a shell
|
||||
psql:ltree.sql:479: NOTICE: ProcedureCreate: type ltree_gist is not yet defined
|
||||
psql:ltree.sql:484: NOTICE: Argument type "ltree_gist" is only a shell
|
||||
psql:ltree.sql:7: NOTICE: ProcedureCreate: type ltree is not yet defined
|
||||
psql:ltree.sql:12: NOTICE: Argument type "ltree" is only a shell
|
||||
psql:ltree.sql:299: NOTICE: ProcedureCreate: type lquery is not yet defined
|
||||
psql:ltree.sql:304: NOTICE: Argument type "lquery" is only a shell
|
||||
psql:ltree.sql:410: NOTICE: ProcedureCreate: type ltxtquery is not yet defined
|
||||
psql:ltree.sql:415: NOTICE: Argument type "ltxtquery" is only a shell
|
||||
psql:ltree.sql:477: NOTICE: ProcedureCreate: type ltree_gist is not yet defined
|
||||
psql:ltree.sql:482: NOTICE: Argument type "ltree_gist" is only a shell
|
||||
SELECT ''::ltree;
|
||||
ltree
|
||||
-------
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE FUNCTION ltree_in(cstring)
|
||||
RETURNS ltree
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -13,8 +13,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION backend_pid()
|
||||
RETURNS int4
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION noup ()
|
||||
RETURNS trigger
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -247,8 +247,6 @@ sql_conn(const char *dbName, struct options * my_opts)
|
||||
|
||||
sql_exec(conn, "SET search_path = public;", 0);
|
||||
|
||||
sql_exec(conn, "SET autocommit TO 'on';", 0);
|
||||
|
||||
/* return the conn if good */
|
||||
return conn;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -------------------------------------------------------------------------
|
||||
* pg_dumplo
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.15 2003/01/09 18:27:39 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.16 2003/05/14 03:25:56 tgl Exp $
|
||||
*
|
||||
* Karel Zak 1999-2000
|
||||
* -------------------------------------------------------------------------
|
||||
@ -191,8 +191,6 @@ main(int argc, char **argv)
|
||||
|
||||
PQexec(pgLO->conn, "SET search_path = public");
|
||||
|
||||
PQexec(pgLO->conn, "SET autocommit TO 'on'");
|
||||
|
||||
PQexec(pgLO->conn, "BEGIN");
|
||||
|
||||
switch (pgLO->action)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.22 2002/10/20 19:38:10 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.23 2003/05/14 03:25:56 tgl Exp $
|
||||
*
|
||||
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
|
||||
* written by Tatsuo Ishii
|
||||
@ -147,13 +147,6 @@ doConnect()
|
||||
exit(1);
|
||||
}
|
||||
PQclear(res);
|
||||
res = PQexec(con, "SET autocommit TO 'on'");
|
||||
if (PQresultStatus(res) != PGRES_COMMAND_OK)
|
||||
{
|
||||
fprintf(stderr, "%s", PQerrorMessage(con));
|
||||
exit(1);
|
||||
}
|
||||
PQclear(res);
|
||||
|
||||
return (con);
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION digest(text, text)
|
||||
RETURNS bytea
|
||||
AS 'MODULE_PATHNAME', 'pg_digest'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
DROP TYPE pgstattuple_type CASCADE;
|
||||
CREATE TYPE pgstattuple_type AS (
|
||||
table_len BIGINT, -- physical table length in bytes
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #
|
||||
# Package : reindexdb Version : $Revision: 1.3 $
|
||||
# Package : reindexdb Version : $Revision: 1.4 $
|
||||
# Date : 05/08/2002 Author : Shaun Thomas
|
||||
# Req : psql, sh, perl, sed Type : Utility
|
||||
#
|
||||
@ -193,11 +193,11 @@ fi
|
||||
|
||||
# If index was set, reindex that index.
|
||||
if [ "$index" ]; then
|
||||
$PSQL $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';REINDEX INDEX $index" -d $dbname
|
||||
$PSQL $PSQLOPT $ECHOOPT -c "REINDEX INDEX $index" -d $dbname
|
||||
|
||||
# Ok, no index. Is there a specific table to reindex?
|
||||
elif [ "$table" ]; then
|
||||
$PSQL $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';REINDEX TABLE \"$table\"" -d $dbname
|
||||
$PSQL $PSQLOPT $ECHOOPT -c "REINDEX TABLE \"$table\"" -d $dbname
|
||||
|
||||
# No specific table, no specific index, either we have a specific database,
|
||||
# or were told to do all databases. Do it!
|
||||
@ -213,9 +213,9 @@ else
|
||||
# Ok, reindex every table in the database. Use the same method
|
||||
# we used to get a list of databases, and get a list of tables in this
|
||||
# database that we may reindex.
|
||||
tables=`$PSQL $PSQLOPT -q -t -A -d $db -c "SET autocommit TO 'on';$sql"`
|
||||
tables=`$PSQL $PSQLOPT -q -t -A -d $db -c "$sql"`
|
||||
for tab in $tables; do
|
||||
$PSQL $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';REINDEX TABLE \"$tab\"" -d $db
|
||||
$PSQL $PSQLOPT $ECHOOPT -c "REINDEX TABLE \"$tab\"" -d $db
|
||||
done
|
||||
|
||||
done
|
||||
|
@ -32,13 +32,6 @@ my $setsql = qq{
|
||||
my $sth = $dbi->prepare($setsql);
|
||||
$sth->execute();
|
||||
|
||||
my $setsql2 = qq{
|
||||
SET autocommit TO 'on';
|
||||
};
|
||||
|
||||
my $sth2 = $dbi->prepare($setsql2);
|
||||
$sth2->execute();
|
||||
|
||||
my $sql;
|
||||
my $notice;
|
||||
my $sss = '(3000,3000,2990,2990)';
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
--
|
||||
--
|
||||
--
|
||||
|
@ -6,8 +6,8 @@
|
||||
-- does not depend on contents of seg.sql.
|
||||
--
|
||||
\set ECHO none
|
||||
psql:seg.sql:12: NOTICE: ProcedureCreate: type seg is not yet defined
|
||||
psql:seg.sql:17: NOTICE: Argument type "seg" is only a shell
|
||||
psql:seg.sql:10: NOTICE: ProcedureCreate: type seg is not yet defined
|
||||
psql:seg.sql:15: NOTICE: Argument type "seg" is only a shell
|
||||
--
|
||||
-- testing the input and output functions
|
||||
--
|
||||
@ -395,25 +395,25 @@ SELECT '100(+-)1'::seg AS seg;
|
||||
SELECT ''::seg AS seg;
|
||||
ERROR: seg_in: can't parse an empty string
|
||||
SELECT 'ABC'::seg AS seg;
|
||||
ERROR: parse error at or near position 1, character ('A', \101), input: 'ABC'
|
||||
ERROR: syntax error at or near position 1, character ('A', \101), input: 'ABC'
|
||||
|
||||
SELECT '1ABC'::seg AS seg;
|
||||
ERROR: parse error at or near position 2, character ('A', \101), input: '1ABC'
|
||||
ERROR: syntax error at or near position 2, character ('A', \101), input: '1ABC'
|
||||
|
||||
SELECT '1.'::seg AS seg;
|
||||
ERROR: parse error at or near position 2, character ('.', \056), input: '1.'
|
||||
ERROR: syntax error at or near position 2, character ('.', \056), input: '1.'
|
||||
|
||||
SELECT '1.....'::seg AS seg;
|
||||
ERROR: parse error at or near position 6, character ('.', \056), input: '1.....'
|
||||
ERROR: syntax error at or near position 6, character ('.', \056), input: '1.....'
|
||||
|
||||
SELECT '.1'::seg AS seg;
|
||||
ERROR: parse error at or near position 2, character ('1', \061), input: '.1'
|
||||
ERROR: syntax error at or near position 2, character ('1', \061), input: '.1'
|
||||
|
||||
SELECT '1..2.'::seg AS seg;
|
||||
ERROR: parse error at or near position 5, character ('.', \056), input: '1..2.'
|
||||
ERROR: syntax error at or near position 5, character ('.', \056), input: '1..2.'
|
||||
|
||||
SELECT '1 e7'::seg AS seg;
|
||||
ERROR: parse error at or near position 3, character ('e', \145), input: '1 e7'
|
||||
ERROR: syntax error at or near position 3, character ('e', \145), input: '1 e7'
|
||||
|
||||
SELECT '1e700'::seg AS seg;
|
||||
ERROR: numeric value 1e700 unrepresentable
|
||||
|
@ -4,8 +4,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE FUNCTION seg_in(cstring)
|
||||
RETURNS seg
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION autoinc()
|
||||
RETURNS trigger
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION insert_username()
|
||||
RETURNS trigger
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION moddatetime()
|
||||
RETURNS trigger
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION check_primary_key()
|
||||
RETURNS trigger
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION timetravel()
|
||||
RETURNS trigger
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION normal_rand(int4, float8, float8, int4)
|
||||
RETURNS setof float8
|
||||
AS 'MODULE_PATHNAME','normal_rand'
|
||||
|
@ -3,14 +3,14 @@
|
||||
-- does not depend on contents of seg.sql.
|
||||
--
|
||||
\set ECHO none
|
||||
psql:tsearch.sql:11: NOTICE: ProcedureCreate: type txtidx is not yet defined
|
||||
psql:tsearch.sql:16: NOTICE: Argument type "txtidx" is only a shell
|
||||
psql:tsearch.sql:40: NOTICE: ProcedureCreate: type query_txt is not yet defined
|
||||
psql:tsearch.sql:45: NOTICE: Argument type "query_txt" is only a shell
|
||||
psql:tsearch.sql:57: NOTICE: ProcedureCreate: type mquery_txt is not yet defined
|
||||
psql:tsearch.sql:63: NOTICE: Argument type "mquery_txt" is only a shell
|
||||
psql:tsearch.sql:158: NOTICE: ProcedureCreate: type gtxtidx is not yet defined
|
||||
psql:tsearch.sql:163: NOTICE: Argument type "gtxtidx" is only a shell
|
||||
psql:tsearch.sql:9: NOTICE: ProcedureCreate: type txtidx is not yet defined
|
||||
psql:tsearch.sql:14: NOTICE: Argument type "txtidx" is only a shell
|
||||
psql:tsearch.sql:38: NOTICE: ProcedureCreate: type query_txt is not yet defined
|
||||
psql:tsearch.sql:43: NOTICE: Argument type "query_txt" is only a shell
|
||||
psql:tsearch.sql:55: NOTICE: ProcedureCreate: type mquery_txt is not yet defined
|
||||
psql:tsearch.sql:61: NOTICE: Argument type "mquery_txt" is only a shell
|
||||
psql:tsearch.sql:156: NOTICE: ProcedureCreate: type gtxtidx is not yet defined
|
||||
psql:tsearch.sql:161: NOTICE: Argument type "gtxtidx" is only a shell
|
||||
--txtidx
|
||||
SELECT '1'::txtidx;
|
||||
txtidx
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
-- TXTIDX type
|
||||
|
||||
CREATE FUNCTION txtidx_in(cstring)
|
||||
|
@ -12,8 +12,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
SET autocommit TO 'on';
|
||||
|
||||
CREATE OR REPLACE FUNCTION user_lock(int4,int4,int4)
|
||||
RETURNS int4
|
||||
AS 'MODULE_PATHNAME'
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/contrib/vacuumlo/vacuumlo.c,v 1.19 2002/12/10 01:57:16 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/contrib/vacuumlo/vacuumlo.c,v 1.20 2003/05/14 03:25:57 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -218,17 +218,6 @@ vacuumlo(char *database, struct _param * param)
|
||||
}
|
||||
PQclear(res);
|
||||
|
||||
res = PQexec(conn, "SET autocommit TO 'on'");
|
||||
if (PQresultStatus(res) != PGRES_COMMAND_OK)
|
||||
{
|
||||
fprintf(stderr, "Failed to set autocommit on:\n");
|
||||
fprintf(stderr, "%s", PQerrorMessage(conn));
|
||||
PQclear(res);
|
||||
PQfinish(conn);
|
||||
return -1;
|
||||
}
|
||||
PQclear(res);
|
||||
|
||||
/*
|
||||
* First we create and populate the LO temp table
|
||||
*/
|
||||
|
@ -3,8 +3,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path TO public;
|
||||
|
||||
SET autocommit TO on;
|
||||
|
||||
CREATE OR REPLACE FUNCTION pgxml_parse(text) RETURNS boolean
|
||||
AS 'MODULE_PATHNAME' LANGUAGE c STRICT;
|
||||
|
||||
|
@ -3,8 +3,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path TO public;
|
||||
|
||||
SET autocommit TO on;
|
||||
|
||||
CREATE OR REPLACE FUNCTION pgxml_parse(text) RETURNS boolean
|
||||
AS 'MODULE_PATHNAME' LANGUAGE c STRICT;
|
||||
|
||||
|
Reference in New Issue
Block a user