Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Adjust error message
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 11 Feb 2019 09:31:36 +0000 (10:31 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 11 Feb 2019 09:31:36 +0000 (10:31 +0100)
We usually don't use "namespace" in user-facing error messages.  Also,
in master this was replaced by another error message referring to
"temporary objects", so we might as well use that here to avoid
introducing too many variants.

Discussion: https://www.postgresql.org/message-id/bbd3f8d9-e3d5-e5aa-4305-7f0121c3fa94@2ndquadrant.com

src/backend/access/transam/xact.c
src/test/modules/test_extensions/expected/test_extensions.out
src/test/regress/expected/temp.out

index 2c517756c0924067f3ef4ca2ac0280d9a8f7fdc5..4cf5ffeedb42bf51047c5edbc7f5e9a00e901923 100644 (file)
@@ -2305,7 +2305,7 @@ PrepareTransaction(void)
    if ((MyXactFlags & XACT_FLAGS_ACCESSEDTEMPNAMESPACE))
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                errmsg("cannot PREPARE a transaction that has operated on temporary namespace")));
+                errmsg("cannot PREPARE a transaction that has operated on temporary objects")));
 
    /*
     * Likewise, don't allow PREPARE after pg_export_snapshot.  This could be
index 1eec5a37d33c8f4eedbd2681e2f01fd707880988..b5cbdfcad4f337c820c34e864fb662d5bb6ea52b 100644 (file)
@@ -148,7 +148,7 @@ SELECT create_extension_with_temp_schema();
 (1 row)
 
 PREPARE TRANSACTION 'twophase_extension';
-ERROR:  cannot PREPARE a transaction that has operated on temporary namespace
+ERROR:  cannot PREPARE a transaction that has operated on temporary objects
 -- Clean up
 DROP TABLE test_ext4_tab;
 DROP FUNCTION create_extension_with_temp_schema();
index d6d8f25141e1a2bb75eebf9b16d5c745ca9263bc..97fe478caedea69bfb72fad26cbff46153498095 100644 (file)
@@ -310,19 +310,19 @@ begin;
 create function pg_temp.twophase_func() returns void as
   $$ select '2pc_func'::text $$ language sql;
 prepare transaction 'twophase_func';
-ERROR:  cannot PREPARE a transaction that has operated on temporary namespace
+ERROR:  cannot PREPARE a transaction that has operated on temporary objects
 -- Function drop
 create function pg_temp.twophase_func() returns void as
   $$ select '2pc_func'::text $$ language sql;
 begin;
 drop function pg_temp.twophase_func();
 prepare transaction 'twophase_func';
-ERROR:  cannot PREPARE a transaction that has operated on temporary namespace
+ERROR:  cannot PREPARE a transaction that has operated on temporary objects
 -- Operator creation
 begin;
 create operator pg_temp.@@ (leftarg = int4, rightarg = int4, procedure = int4mi);
 prepare transaction 'twophase_operator';
-ERROR:  cannot PREPARE a transaction that has operated on temporary namespace
+ERROR:  cannot PREPARE a transaction that has operated on temporary objects
 -- These generate errors about temporary tables.
 begin;
 create type pg_temp.twophase_type as (a int);
@@ -374,4 +374,4 @@ SELECT current_schema() ~ 'pg_temp' AS is_temp_schema;
 (1 row)
 
 PREPARE TRANSACTION 'twophase_search';
-ERROR:  cannot PREPARE a transaction that has operated on temporary namespace
+ERROR:  cannot PREPARE a transaction that has operated on temporary objects