Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit12055c8

Browse files
committed
Adjust error message
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 avoidintroducing too many variants.Discussion:https://www.postgresql.org/message-id/bbd3f8d9-e3d5-e5aa-4305-7f0121c3fa94@2ndquadrant.com
1 parenteb68d71 commit12055c8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2305,7 +2305,7 @@ PrepareTransaction(void)
23052305
if ((MyXactFlags&XACT_FLAGS_ACCESSEDTEMPNAMESPACE))
23062306
ereport(ERROR,
23072307
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2308-
errmsg("cannot PREPARE a transaction that has operated on temporarynamespace")));
2308+
errmsg("cannot PREPARE a transaction that has operated on temporaryobjects")));
23092309

23102310
/*
23112311
* Likewise, don't allow PREPARE after pg_export_snapshot. This could be

‎src/test/modules/test_extensions/expected/test_extensions.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ SELECT create_extension_with_temp_schema();
148148
(1 row)
149149

150150
PREPARE TRANSACTION 'twophase_extension';
151-
ERROR: cannot PREPARE a transaction that has operated on temporarynamespace
151+
ERROR: cannot PREPARE a transaction that has operated on temporaryobjects
152152
-- Clean up
153153
DROP TABLE test_ext4_tab;
154154
DROP FUNCTION create_extension_with_temp_schema();

‎src/test/regress/expected/temp.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,19 +310,19 @@ begin;
310310
create function pg_temp.twophase_func() returns void as
311311
$$ select '2pc_func'::text $$ language sql;
312312
prepare transaction 'twophase_func';
313-
ERROR: cannot PREPARE a transaction that has operated on temporarynamespace
313+
ERROR: cannot PREPARE a transaction that has operated on temporaryobjects
314314
-- Function drop
315315
create function pg_temp.twophase_func() returns void as
316316
$$ select '2pc_func'::text $$ language sql;
317317
begin;
318318
drop function pg_temp.twophase_func();
319319
prepare transaction 'twophase_func';
320-
ERROR: cannot PREPARE a transaction that has operated on temporarynamespace
320+
ERROR: cannot PREPARE a transaction that has operated on temporaryobjects
321321
-- Operator creation
322322
begin;
323323
create operator pg_temp.@@ (leftarg = int4, rightarg = int4, procedure = int4mi);
324324
prepare transaction 'twophase_operator';
325-
ERROR: cannot PREPARE a transaction that has operated on temporarynamespace
325+
ERROR: cannot PREPARE a transaction that has operated on temporaryobjects
326326
-- These generate errors about temporary tables.
327327
begin;
328328
create type pg_temp.twophase_type as (a int);
@@ -374,4 +374,4 @@ SELECT current_schema() ~ 'pg_temp' AS is_temp_schema;
374374
(1 row)
375375

376376
PREPARE TRANSACTION 'twophase_search';
377-
ERROR: cannot PREPARE a transaction that has operated on temporarynamespace
377+
ERROR: cannot PREPARE a transaction that has operated on temporaryobjects

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp