[SCM] PostGIS branch master updated. 3.4.0rc1-1093-g9a746f869

git at osgeo.org git at osgeo.org
Mon Apr 22 12:01:57 PDT 2024


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  9a746f869c5486706b08bf60d35a0c61d923888d (commit)
      from  260b2eeefc720995c5922efee6b535fee111a10a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9a746f869c5486706b08bf60d35a0c61d923888d
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Apr 22 12:01:43 2024 -0700

    Remove long transaction functions, AddAuth, CheckAuth, DisableLongTransactions, EnableLongTransactions, LockRow, UnlockRows

diff --git a/NEWS b/NEWS
index 6a469da99..e31f0e48a 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ To take advantage of all SFCGAL featurs, SFCGAL 1.5.0+ is needed.
            rebuilding of materialized views that use them (Regina Obe)
   - #5659, ST_DFullyWithin behaviour has changed to
            be ST_Contains(ST_Buffer(A, R), B) (Paul Ramsey)
+  - Remove the WFS_locks extra package. (Paul Ramsey)
 
 * Deprecated signatures *
   - GH-761, ST_StraightSkeleton => CG_StraightSkeleton (Loïc Bartoletti)
diff --git a/postgis/Makefile.in b/postgis/Makefile.in
index c5b448b13..d9361ff1e 100644
--- a/postgis/Makefile.in
+++ b/postgis/Makefile.in
@@ -102,7 +102,6 @@ PG_OBJS= \
 	lwgeom_functions_temporal.o \
 	lwgeom_rectree.o \
 	lwgeom_itree.o \
-	long_xact.o \
 	lwgeom_sqlmm.o \
 	lwgeom_transform.o \
 	lwgeom_window.o \
@@ -255,7 +254,7 @@ postgis_upgrade.sql: common_before_upgrade.sql postgis_before_upgrade.sql postgi
 # SQL objects are also dependent on postgis_config.h for PostgreSQL version
 $(SQL_OBJS): ../postgis_config.h ../postgis_revision.h
 
-postgis.sql: sqldefines.h long_xact.sql.in geography.sql.in postgis_brin.sql.in postgis_spgist.sql.in postgis_letters.sql
+postgis.sql: sqldefines.h geography.sql.in postgis_brin.sql.in postgis_spgist.sql.in postgis_letters.sql
 
 uninstall_postgis.sql: postgis.sql ../utils/create_uninstall.pl
 	$(PERL) @top_srcdir@/utils/create_uninstall.pl $< $(POSTGIS_PGSQL_VERSION) > $@
diff --git a/postgis/long_xact.c b/postgis/long_xact.c
deleted file mode 100644
index 68e64796d..000000000
--- a/postgis/long_xact.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/**********************************************************************
- *
- * PostGIS - Spatial Types for PostgreSQL
- * http://postgis.net
- *
- * PostGIS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * PostGIS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with PostGIS.  If not, see <http://www.gnu.org/licenses/>.
- *
- **********************************************************************
- *
- * Copyright (C) 2006 Refractions Research Inc.
- *
- **********************************************************************/
-
-
-#include "postgres.h"
-#include "access/xact.h"
-#include "executor/spi.h"       /* this is what you need to work with SPI */
-#include "commands/trigger.h"   /* ... and triggers */
-#include "utils/lsyscache.h"	/* for get_namespace_name() */
-#include "utils/rel.h"
-#include "../postgis_config.h"
-#include "lwgeom_pg.h"
-
-#define ABORT_ON_AUTH_FAILURE 1
-
-Datum check_authorization(PG_FUNCTION_ARGS);
-Datum getTransactionID(PG_FUNCTION_ARGS);
-
-/*
- * This trigger will check for authorization before
- * allowing UPDATE or DELETE of specific rows.
- * Rows are identified by the provided column.
- * Authorization info is extracted by the
- * "authorization_table"
- *
- */
-PG_FUNCTION_INFO_V1(check_authorization);
-Datum check_authorization(PG_FUNCTION_ARGS)
-{
-	TriggerData *trigdata = (TriggerData *) fcinfo->context;
-	char *colname;
-	HeapTuple rettuple_ok;
-	HeapTuple rettuple_fail;
-	TupleDesc tupdesc;
-	int SPIcode;
-	char query[1024];
-	const char *pk_id = NULL;
-	SPITupleTable *tuptable;
-	HeapTuple tuple;
-	char *lockcode;
-	char *authtable = "authorization_table";
-	const char *op;
-	char err_msg[256];
-
-
-	/* Make sure trigdata is pointing at what I expect */
-	if ( ! CALLED_AS_TRIGGER(fcinfo) )
-	{
-		elog(ERROR,"check_authorization: not fired by trigger manager");
-	}
-
-	if ( ! TRIGGER_FIRED_BEFORE(trigdata->tg_event) )
-	{
-		elog(ERROR,"check_authorization: not fired *before* event");
-	}
-
-	if ( TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event) )
-	{
-		rettuple_ok = trigdata->tg_newtuple;
-		rettuple_fail = NULL;
-		op = "UPDATE";
-	}
-	else if ( TRIGGER_FIRED_BY_DELETE(trigdata->tg_event) )
-	{
-		rettuple_ok = trigdata->tg_trigtuple;
-		rettuple_fail = NULL;
-		op = "DELETE";
-	}
-	else
-	{
-		elog(ERROR,"check_authorization: not fired by update or delete");
-		PG_RETURN_NULL();
-	}
-
-
-	tupdesc = trigdata->tg_relation->rd_att;
-
-	/* Connect to SPI manager */
-	SPIcode = SPI_connect();
-
-	if (SPIcode  != SPI_OK_CONNECT)
-	{
-		elog(ERROR,"check_authorization: could not connect to SPI");
-		PG_RETURN_NULL() ;
-	}
-
-	colname  = trigdata->tg_trigger->tgargs[0];
-	pk_id = SPI_getvalue(trigdata->tg_trigtuple, tupdesc,
-	                     SPI_fnumber(tupdesc, colname));
-
-	POSTGIS_DEBUG(3, "check_authorization called");
-
-	snprintf(query, sizeof(query), "SELECT authid FROM \"%s\" WHERE expires >= now() AND toid = '%d' AND rid = '%s'", authtable, trigdata->tg_relation->rd_id, pk_id);
-
-	POSTGIS_DEBUGF(3 ,"about to execute :%s", query);
-
-	SPIcode = SPI_exec(query,0);
-	if (SPIcode !=SPI_OK_SELECT )
-		elog(ERROR,"couldnt execute to test for lock :%s",query);
-
-	if (!SPI_processed )
-	{
-		POSTGIS_DEBUGF(3, "there is NO lock on row '%s'", pk_id);
-
-		SPI_finish();
-		return PointerGetDatum(rettuple_ok);
-	}
-
-	/* there is a lock - check to see if I have rights to it! */
-
-	tuptable = SPI_tuptable;
-	tupdesc = tuptable->tupdesc;
-	tuple = tuptable->vals[0];
-	lockcode = SPI_getvalue(tuple, tupdesc, 1);
-
-	POSTGIS_DEBUGF(3, "there is a lock on row '%s' (auth: '%s').", pk_id, lockcode);
-
-	/*
-	 * check to see if temp_lock_have_table table exists
-	 * (it might not exist if they own no locks)
-	 */
-	snprintf(query, sizeof(query), "SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table'");
-	SPIcode = SPI_exec(query,0);
-	if (SPIcode != SPI_OK_SELECT )
-		elog(ERROR,"couldnt execute to test for lockkey temp table :%s",query);
-	if (SPI_processed==0)
-	{
-		goto fail;
-	}
-
-	snprintf(query, sizeof(query), "SELECT * FROM temp_lock_have_table WHERE xideq( transid, getTransactionID() ) AND lockcode ='%s'", lockcode);
-
-	POSTGIS_DEBUGF(3, "about to execute :%s", query);
-
-	SPIcode = SPI_exec(query,0);
-	if (SPIcode != SPI_OK_SELECT )
-		elog(ERROR, "couldnt execute to test for lock acquire: %s", query);
-
-	if (SPI_processed >0)
-	{
-		POSTGIS_DEBUG(3, "I own the lock - I can modify the row");
-
-		SPI_finish();
-		return PointerGetDatum(rettuple_ok);
-	}
-
-fail:
-
-	snprintf(err_msg, sizeof(err_msg), "%s where \"%s\" = '%s' requires authorization '%s'",
-	         op, colname, pk_id, lockcode);
-	err_msg[sizeof(err_msg)-1] = '\0';
-
-#ifdef ABORT_ON_AUTH_FAILURE
-	elog(ERROR, "%s", err_msg);
-#else
-	elog(NOTICE, "%s", err_msg);
-#endif
-
-	SPI_finish();
-	return PointerGetDatum(rettuple_fail);
-
-
-}
-
-PG_FUNCTION_INFO_V1(getTransactionID);
-Datum getTransactionID(PG_FUNCTION_ARGS)
-{
-	TransactionId xid = GetCurrentTransactionId();
-	PG_RETURN_DATUM( TransactionIdGetDatum(xid) );
-}
diff --git a/postgis/long_xact.sql.in b/postgis/long_xact.sql.in
deleted file mode 100644
index cb7294ba2..000000000
--- a/postgis/long_xact.sql.in
+++ /dev/null
@@ -1,321 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
---
--- PostGIS - Spatial Types for PostgreSQL
--- http://postgis.net
--- Copyright 2001-2003 Refractions Research Inc.
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-#include "sqldefines.h"
-
------------------------------------------------------------------------
--- LONG TERM LOCKING
------------------------------------------------------------------------
-
--- UnlockRows(authid)
--- removes all locks held by the given auth
--- returns the number of locks released
-CREATE OR REPLACE FUNCTION UnlockRows(text)
-	RETURNS int
-	AS $$
-DECLARE
-	ret int;
-BEGIN
-
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	EXECUTE 'DELETE FROM authorization_table where authid = ' ||
-		quote_literal($1);
-
-	GET DIAGNOSTICS ret = ROW_COUNT;
-
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql'  VOLATILE STRICT;
-
--- LockRow([schema], table, rowid, auth, [expires])
--- Returns 1 if successfully obtained the lock, 0 otherwise
-CREATE OR REPLACE FUNCTION LockRow(text, text, text, text, timestamp)
-	RETURNS int
-	AS $$
-DECLARE
-	myschema alias for $1;
-	mytable alias for $2;
-	myrid   alias for $3;
-	authid alias for $4;
-	expires alias for $5;
-	ret int;
-	mytoid oid;
-	myrec RECORD;
-
-BEGIN
-
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	EXECUTE 'DELETE FROM authorization_table WHERE expires < now()';
-
-	SELECT c.oid INTO mytoid FROM pg_class c, pg_namespace n
-		WHERE c.relname = mytable
-		AND c.relnamespace = n.oid
-		AND n.nspname = myschema;
-
-	-- RAISE NOTICE 'toid: %', mytoid;
-
-	FOR myrec IN SELECT * FROM authorization_table WHERE
-		toid = mytoid AND rid = myrid
-	LOOP
-		IF myrec.authid != authid THEN
-			RETURN 0;
-		ELSE
-			RETURN 1;
-		END IF;
-	END LOOP;
-
-	EXECUTE 'INSERT INTO authorization_table VALUES ('||
-		quote_literal(mytoid::text)||','||quote_literal(myrid)||
-		','||quote_literal(expires::text)||
-		','||quote_literal(authid) ||')';
-
-	GET DIAGNOSTICS ret = ROW_COUNT;
-
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql'  VOLATILE STRICT;
-
--- LockRow(schema, table, rid, authid);
-CREATE OR REPLACE FUNCTION LockRow(text, text, text, text)
-	RETURNS int
-	AS
-$$ SELECT LockRow($1, $2, $3, $4, now()::timestamp+'1:00'); $$
-	LANGUAGE 'sql'  VOLATILE STRICT;
-
--- LockRow(table, rid, authid);
-CREATE OR REPLACE FUNCTION LockRow(text, text, text)
-	RETURNS int
-	AS
-$$ SELECT LockRow(current_schema(), $1, $2, $3, now()::timestamp+'1:00'); $$
-	LANGUAGE 'sql'  VOLATILE STRICT;
-
--- LockRow(schema, table, rid, expires);
-CREATE OR REPLACE FUNCTION LockRow(text, text, text, timestamp)
-	RETURNS int
-	AS
-$$ SELECT LockRow(current_schema(), $1, $2, $3, $4); $$
-	LANGUAGE 'sql'  VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION AddAuth(text)
-	RETURNS BOOLEAN
-	AS $$
-DECLARE
-	lockid alias for $1;
-	okay boolean;
-	myrec record;
-BEGIN
-	-- check to see if table exists
-	--  if not, CREATE TEMP TABLE mylock (transid xid, lockcode text)
-	okay := 'f';
-	FOR myrec IN SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table' LOOP
-		okay := 't';
-	END LOOP;
-	IF (okay <> 't') THEN
-		CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text);
-			-- this will only work from pgsql7.4 up
-			-- ON COMMIT DELETE ROWS;
-	END IF;
-
-	--  INSERT INTO mylock VALUES ( $1)
---	EXECUTE 'INSERT INTO temp_lock_have_table VALUES ( '||
---		quote_literal(getTransactionID()) || ',' ||
---		quote_literal(lockid) ||')';
-
-	INSERT INTO temp_lock_have_table VALUES (getTransactionID(), lockid);
-
-	RETURN true::boolean;
-END;
-$$
-LANGUAGE PLPGSQL;
-
--- CheckAuth( <schema>, <table>, <ridcolumn> )
---
--- Returns 0
---
-CREATE OR REPLACE FUNCTION CheckAuth(text, text, text)
-	RETURNS INT
-	AS $$
-DECLARE
-	schema text;
-BEGIN
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	if ( $1 != '' ) THEN
-		schema = $1;
-	ELSE
-		SELECT current_schema() into schema;
-	END IF;
-
-	-- TODO: check for an already existing trigger ?
-
-	EXECUTE 'CREATE TRIGGER check_auth BEFORE UPDATE OR DELETE ON '
-		|| quote_ident(schema) || '.' || quote_ident($2)
-		||' FOR EACH ROW EXECUTE PROCEDURE CheckAuthTrigger('
-		|| quote_literal($3) || ')';
-
-	RETURN 0;
-END;
-$$
-LANGUAGE 'plpgsql';
-
--- CheckAuth(<table>, <ridcolumn>)
-CREATE OR REPLACE FUNCTION CheckAuth(text, text)
-	RETURNS INT
-	AS
-	$$ SELECT CheckAuth('', $1, $2) $$
-	LANGUAGE 'sql';
-
-CREATE OR REPLACE FUNCTION CheckAuthTrigger()
-	RETURNS trigger AS
-	'MODULE_PATHNAME', 'check_authorization'
-	LANGUAGE C;
-
-CREATE OR REPLACE FUNCTION GetTransactionID()
-	RETURNS xid AS
-	'MODULE_PATHNAME', 'getTransactionID'
-	LANGUAGE C;
-
---
--- Enable Long transactions support
---
---  Creates the authorization_table if not already existing
---
-CREATE OR REPLACE FUNCTION EnableLongTransactions()
-	RETURNS TEXT
-	AS $$
-DECLARE
-	"query" text;
-	exists bool;
-	rec RECORD;
-
-BEGIN
-
-	exists = 'f';
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table'
-	LOOP
-		exists = 't';
-	END LOOP;
-
-	IF NOT exists
-	THEN
-		"query" = 'CREATE TABLE authorization_table (
-			toid oid, -- table oid
-			rid text, -- row id
-			expires timestamp,
-			authid text
-		)';
-		EXECUTE "query";
-	END IF;
-
-	exists = 'f';
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables'
-	LOOP
-		exists = 't';
-	END LOOP;
-
-	IF NOT exists THEN
-		"query" = 'CREATE VIEW authorized_tables AS ' ||
-			'SELECT ' ||
-			'n.nspname as schema, ' ||
-			'c.relname as table, trim(' ||
-			quote_literal(chr(92) || '000') ||
-			' from t.tgargs) as id_column ' ||
-			'FROM pg_trigger t, pg_class c, pg_proc p ' ||
-			', pg_namespace n ' ||
-			'WHERE p.proname = ' || quote_literal('checkauthtrigger') ||
-			' AND c.relnamespace = n.oid' ||
-			' AND t.tgfoid = p.oid and t.tgrelid = c.oid';
-		EXECUTE "query";
-	END IF;
-
-	RETURN 'Long transactions support enabled';
-END;
-$$
-LANGUAGE 'plpgsql';
-
---
--- Check if Long transactions support is enabled
---
-CREATE OR REPLACE FUNCTION LongTransactionsEnabled()
-	RETURNS bool
-AS $$
-DECLARE
-	rec RECORD;
-BEGIN
-	FOR rec IN SELECT oid FROM pg_class WHERE relname = 'authorized_tables'
-	LOOP
-		return 't';
-	END LOOP;
-	return 'f';
-END;
-$$
-LANGUAGE 'plpgsql';
-
---
--- Disable Long transactions support
---
---  (1) Drop any long_xact trigger
---  (2) Drop the authorization_table
---  (3) KEEP the authorized_tables view
---
-CREATE OR REPLACE FUNCTION DisableLongTransactions()
-	RETURNS TEXT
-	AS $$
-DECLARE
-	rec RECORD;
-
-BEGIN
-
-	--
-	-- Drop all triggers applied by CheckAuth()
-	--
-	FOR rec IN
-		SELECT c.relname, t.tgname, t.tgargs FROM pg_trigger t, pg_class c, pg_proc p
-		WHERE p.proname = 'checkauthtrigger' and t.tgfoid = p.oid and t.tgrelid = c.oid
-	LOOP
-		EXECUTE 'DROP TRIGGER ' || quote_ident(rec.tgname) ||
-			' ON ' || quote_ident(rec.relname);
-	END LOOP;
-
-	--
-	-- Drop the authorization_table table
-	--
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table' LOOP
-		DROP TABLE authorization_table;
-	END LOOP;
-
-	--
-	-- Drop the authorized_tables view
-	--
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables' LOOP
-		DROP VIEW authorized_tables;
-	END LOOP;
-
-	RETURN 'Long transactions support disabled';
-END;
-$$
-LANGUAGE 'plpgsql';
-
----------------------------------------------------------------
--- END
----------------------------------------------------------------
-
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 2c3941a6c..9677eeccc 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -6215,7 +6215,6 @@ $$
 LANGUAGE 'plpgsql' IMMUTABLE STRICT PARALLEL SAFE;
 
 /* Should we include the .sql directly here ? */
-#include "long_xact.sql.in"
 #include "geography.sql.in"
 
 -- Availability: 2.2.0
diff --git a/postgis/uninstall_long_xact.sql.in b/postgis/uninstall_long_xact.sql.in
deleted file mode 100644
index cda20e785..000000000
--- a/postgis/uninstall_long_xact.sql.in
+++ /dev/null
@@ -1,30 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
---
--- PostGIS - Spatial Types for PostgreSQL
--- http://postgis.net
--- Copyright 2001-2003 Refractions Research Inc.
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
------------------------------------------------------------------------
--- LONG TERM LOCKING
------------------------------------------------------------------------
-
-DROP FUNCTION UnlockRows(text);
-DROP FUNCTION LockRow(text, text, text, text, timestamp);
-DROP FUNCTION LockRow(text, text, text, text);
-DROP FUNCTION LockRow(text, text, text);
-DROP FUNCTION LockRow(text, text, text, timestamp);
-DROP FUNCTION AddAuth(text);
-DROP FUNCTION CheckAuth(text, text, text);
-DROP FUNCTION CheckAuth(text, text);
-DROP FUNCTION CheckAuthTrigger();
-DROP FUNCTION GetTransactionID();
-DROP FUNCTION EnableLongTransactions();
-DROP FUNCTION LongTransactionsEnabled();
-DROP FUNCTION DisableLongTransactions();
-
diff --git a/regress/core/long_xact.sql b/regress/core/long_xact.sql
deleted file mode 100644
index 19e16e749..000000000
--- a/regress/core/long_xact.sql
+++ /dev/null
@@ -1,60 +0,0 @@
-
-SELECT EnableLongTransactions();
-
-CREATE TABLE test_locks (id numeric, state varchar);
-INSERT INTO test_locks(id) VALUES (1);
-INSERT INTO test_locks(id) VALUES (2);
-INSERT INTO test_locks(id) VALUES (3);
-
--- Enable locks checking on the table
-SELECT CheckAuth('test_locks', 'id');
-
--- this has no lock
-UPDATE test_locks SET state = 'nolocks';
-
--- place the lock
-SELECT LockRow('test_locks', '1', 'auth1', now()::timestamp+'00:01');
-SELECT LockRow('test_locks', '2', 'auth2', now()::timestamp+'00:01');
-
--- this should fail due to missing auth
-UPDATE test_locks SET state = 'unauthorized' where id = 1;
-
-BEGIN;
-
-	-- Add authorization for row 1
-	SELECT AddAuth('auth1');
-
-	-- we're authorized for row 1
-	UPDATE test_locks SET state = 'authorized' where id = 1;
-END;
-
--- Out of transaction we're no more authorized for row 1
-UPDATE test_locks SET state = 'unauthorized' where id = 1;
-
-BEGIN;
-
-	-- Add authorization for row 2
-	SELECT AddAuth('auth2');
-
-	-- we're authorized for row 2
-	UPDATE test_locks SET state = 'authorized' where id = 2;
-END;
-
-BEGIN;
-
-	-- Add authorization for row 2
-	SELECT AddAuth('auth2');
-
-	-- we're *not* authorized for row 1
-	UPDATE test_locks SET state = 'unauthorized' where id = 1;
-END;
-
-UPDATE test_locks SET state = 'unauthorized' where id = 2;
-UPDATE test_locks SET state = 'unauthorized' where id = 1;
-
-SELECT * from test_locks;
-
-DROP TABLE test_locks;
-
-SELECT DisableLongTransactions();
-
diff --git a/regress/core/long_xact_expected b/regress/core/long_xact_expected
deleted file mode 100644
index 5acec95a5..000000000
--- a/regress/core/long_xact_expected
+++ /dev/null
@@ -1,16 +0,0 @@
-Long transactions support enabled
-0
-1
-1
-ERROR:  UPDATE where "id" = '1' requires authorization 'auth1'
-t
-ERROR:  UPDATE where "id" = '1' requires authorization 'auth1'
-t
-t
-ERROR:  UPDATE where "id" = '1' requires authorization 'auth1'
-ERROR:  UPDATE where "id" = '2' requires authorization 'auth2'
-ERROR:  UPDATE where "id" = '1' requires authorization 'auth1'
-3|nolocks
-1|authorized
-2|authorized
-Long transactions support disabled
diff --git a/regress/core/tests.mk.in b/regress/core/tests.mk.in
index 7e783d7b5..6d8b4ed22 100644
--- a/regress/core/tests.mk.in
+++ b/regress/core/tests.mk.in
@@ -62,7 +62,6 @@ TESTS += \
 	$(top_srcdir)/regress/core/iscollection \
 	$(top_srcdir)/regress/core/legacy \
 	$(top_srcdir)/regress/core/letters \
-	$(top_srcdir)/regress/core/long_xact \
 	$(top_srcdir)/regress/core/lwgeom_regress \
 	$(top_srcdir)/regress/core/measures \
 	$(top_srcdir)/regress/core/minimum_bounding_circle \
diff --git a/utils/read_scripts_version.pl b/utils/read_scripts_version.pl
index e402aed51..7a38dbf2c 100755
--- a/utils/read_scripts_version.pl
+++ b/utils/read_scripts_version.pl
@@ -5,7 +5,6 @@ my $debug = 0;
 my @files = ( 
 	"postgis.sql.in.c",
 	"geography.sql.in.c",
-	"long_xact.sql.in.c" 
 	);
 
 my $rev = 0;

-----------------------------------------------------------------------

Summary of changes:
 NEWS                               |   1 +
 postgis/Makefile.in                |   3 +-
 postgis/long_xact.c                | 191 ----------------------
 postgis/long_xact.sql.in           | 321 -------------------------------------
 postgis/postgis.sql.in             |   1 -
 postgis/uninstall_long_xact.sql.in |  30 ----
 regress/core/long_xact.sql         |  60 -------
 regress/core/long_xact_expected    |  16 --
 regress/core/tests.mk.in           |   1 -
 utils/read_scripts_version.pl      |   1 -
 10 files changed, 2 insertions(+), 623 deletions(-)
 delete mode 100644 postgis/long_xact.c
 delete mode 100644 postgis/long_xact.sql.in
 delete mode 100644 postgis/uninstall_long_xact.sql.in
 delete mode 100644 regress/core/long_xact.sql
 delete mode 100644 regress/core/long_xact_expected


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list