Skip to content

Commit e568aa6

Browse files
committed
[PGPRO-8041] Corrected warning message; moved line with assignment
Tags: pg_pathman
1 parent 2bb067d commit e568aa6

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

expected/pathman_runtime_nodes.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ UPDATE part_test SET val = val + 1 RETURNING *, tableoid::regclass;
491491

492492
UPDATE part_test SET val = val + 1 RETURNING *, tableoid::regclass;
493493
NOTICE: AFTER DELETE ROW (part_test_1)
494-
WARNING: "SET pg_pathman.enable" must be called before any query. Command ignored.
494+
WARNING: "pg_pathman.enable" must be called before any query, ignored
495495
val | tableoid
496496
-----+------------
497497
3 | pg_pathman

expected/pathman_runtime_nodes_1.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ UPDATE part_test SET val = val + 1 RETURNING *, tableoid::regclass;
491491

492492
UPDATE part_test SET val = val + 1 RETURNING *, tableoid::regclass;
493493
NOTICE: AFTER DELETE ROW (part_test_1)
494-
WARNING: "SET pg_pathman.enable" must be called before any query. Command ignored.
494+
WARNING: "pg_pathman.enable" must be called before any query, ignored
495495
val | tableoid
496496
-----+------------
497497
3 | pg_pathman

src/hooks.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -637,13 +637,12 @@ pathman_enable_check_hook(bool *newval, void **extra, GucSource source)
637637
#endif
638638
IsSubTransaction())
639639
{
640-
/* Keep the old value. */
641-
*newval = pathman_init_state.pg_pathman_enable;
642-
643640
ereport(WARNING,
644641
(errcode(ERRCODE_ACTIVE_SQL_TRANSACTION),
645-
errmsg("\"SET pg_pathman.enable\" must be called before any query. "
646-
"Command ignored.")));
642+
errmsg("\"pg_pathman.enable\" must be called before any query, ignored")));
643+
644+
/* Keep the old value. */
645+
*newval = pathman_init_state.pg_pathman_enable;
647646
}
648647

649648
return true;

0 commit comments

Comments
 (0)