Skip to content

Commit

Permalink
Adjust a lot of error or warning messages to get more homogeneous mes…
Browse files Browse the repository at this point in the history
…sage patterns. Also improve some messages for clarity.
  • Loading branch information
beaud76 committed Jul 15, 2017
1 parent 30aa3ca commit 737cd4d
Show file tree
Hide file tree
Showing 77 changed files with 3,989 additions and 3,296 deletions.
870 changes: 781 additions & 89 deletions sql/emaj--2.0.1--next_version.sql

Large diffs are not rendered by default.

248 changes: 122 additions & 126 deletions sql/emaj--next_version.sql

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions test/10/expected/adm1.out
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ NOTICE: trigger "emaj_trunc_trg" for relation "myschema1.mytbl4" does not exist
NOTICE: table "myschema1_mytbl2_log" does not exist, skipping
NOTICE: trigger "emaj_log_trg" for relation "myschema1.mytbl2" does not exist, skipping
NOTICE: trigger "emaj_trunc_trg" for relation "myschema1.mytbl2" does not exist, skipping
WARNING: _create_tbl: table "myschema1.mytbl2" has triggers (mytbl2trg). Verify the compatibility with emaj rollback operations (in particular if triggers update one or several other tables). Triggers may have to be manualy disabled before rollback.
WARNING: _create_tbl: The table "myschema1.mytbl2" has triggers (mytbl2trg). Verify the compatibility with emaj rollback operations (in particular if triggers update one or several other tables). Triggers may have to be manualy disabled before rollback.
NOTICE: table "myschema1_mytbl2b_log" does not exist, skipping
NOTICE: trigger "emaj_log_trg" for relation "myschema1.mytbl2b" does not exist, skipping
NOTICE: trigger "emaj_trunc_trg" for relation "myschema1.mytbl2b" does not exist, skipping
Expand Down Expand Up @@ -262,8 +262,8 @@ NOTICE: trigger "emaj_trunc_trg" for relation "myschema2.mytbl5" does not exist
NOTICE: table "myschema2_mytbl6_log" does not exist, skipping
NOTICE: trigger "emaj_log_trg" for relation "myschema2.mytbl6" does not exist, skipping
NOTICE: trigger "emaj_trunc_trg" for relation "myschema2.mytbl6" does not exist, skipping
WARNING: _check_fk_groups: Foreign key "mytbl6_col61_fkey", from table "myschema2.mytbl6", references "myschema2.mytbl7" that is outside groups (myGroup2).
WARNING: _check_fk_groups: table "myschema2.mytbl6" is referenced by foreign key "mytbl8_col81_fkey" from table "myschema2.mytbl8" that is outside groups (myGroup2).
WARNING: _check_fk_groups: The foreign key "mytbl6_col61_fkey" on the table "myschema2.mytbl6" references the table "myschema2.mytbl7" that is outside the groups (myGroup2).
WARNING: _check_fk_groups: The table "myschema2.mytbl6" is referenced by the foreign key "mytbl8_col81_fkey" on the table "myschema2.mytbl8" that is outside the groups (myGroup2).
emaj_create_group
-------------------
8
Expand All @@ -285,8 +285,8 @@ select emaj.emaj_start_group('myGroup1','M1');

delete from emaj.emaj_param where param_key = 'history_retention';
select emaj.emaj_start_group('myGroup2','M1');
WARNING: _check_fk_groups: Foreign key "mytbl6_col61_fkey", from table "myschema2.mytbl6", references "myschema2.mytbl7" that is outside groups (myGroup2).
WARNING: _check_fk_groups: table "myschema2.mytbl6" is referenced by foreign key "mytbl8_col81_fkey" from table "myschema2.mytbl8" that is outside groups (myGroup2).
WARNING: _check_fk_groups: The foreign key "mytbl6_col61_fkey" on the table "myschema2.mytbl6" references the table "myschema2.mytbl7" that is outside the groups (myGroup2).
WARNING: _check_fk_groups: The table "myschema2.mytbl6" is referenced by the foreign key "mytbl8_col81_fkey" on the table "myschema2.mytbl8" that is outside the groups (myGroup2).
emaj_start_group
------------------
8
Expand Down Expand Up @@ -810,16 +810,16 @@ analyze mytbl4;
revoke execute on function dblink_connect_u(text,text) from emaj_adm;
set role emaj_regression_tests_adm_user;
select * from emaj.emaj_logged_rollback_group('myGroup2','M2',false) order by 1,2;
WARNING: _check_fk_groups: Foreign key "mytbl6_col61_fkey", from table "myschema2.mytbl6", references "myschema2.mytbl7" that is outside groups (myGroup2).
WARNING: _check_fk_groups: table "myschema2.mytbl6" is referenced by foreign key "mytbl8_col81_fkey" from table "myschema2.mytbl8" that is outside groups (myGroup2).
WARNING: _check_fk_groups: The foreign key "mytbl6_col61_fkey" on the table "myschema2.mytbl6" references the table "myschema2.mytbl7" that is outside the groups (myGroup2).
WARNING: _check_fk_groups: The table "myschema2.mytbl6" is referenced by the foreign key "mytbl8_col81_fkey" on the table "myschema2.mytbl8" that is outside the groups (myGroup2).
rlbk_severity | rlbk_message
---------------+-------------------------------------------------
Notice | 3 tables and 2 sequences effectively processed.
(1 row)

select * from emaj.emaj_logged_rollback_group('myGroup2','M3',false) order by 1,2;
WARNING: _check_fk_groups: Foreign key "mytbl6_col61_fkey", from table "myschema2.mytbl6", references "myschema2.mytbl7" that is outside groups (myGroup2).
WARNING: _check_fk_groups: table "myschema2.mytbl6" is referenced by foreign key "mytbl8_col81_fkey" from table "myschema2.mytbl8" that is outside groups (myGroup2).
WARNING: _check_fk_groups: The foreign key "mytbl6_col61_fkey" on the table "myschema2.mytbl6" references the table "myschema2.mytbl7" that is outside the groups (myGroup2).
WARNING: _check_fk_groups: The table "myschema2.mytbl6" is referenced by the foreign key "mytbl8_col81_fkey" on the table "myschema2.mytbl8" that is outside the groups (myGroup2).
rlbk_severity | rlbk_message
---------------+-------------------------------------------------
Notice | 3 tables and 2 sequences effectively processed.
Expand Down Expand Up @@ -1400,17 +1400,17 @@ select col41, col42, col43, col44, col45, emaj_verb, emaj_tuple, emaj_gid from e
-- Step 5 : for myGroup2, logged rollback again then unlogged rollback
-----------------------------
select * from emaj.emaj_logged_rollback_group('myGroup2','M2',false) order by 1,2;
WARNING: _check_fk_groups: Foreign key "mytbl6_col61_fkey", from table "myschema2.mytbl6", references "myschema2.mytbl7" that is outside groups (myGroup2).
WARNING: _check_fk_groups: table "myschema2.mytbl6" is referenced by foreign key "mytbl8_col81_fkey" from table "myschema2.mytbl8" that is outside groups (myGroup2).
WARNING: _check_fk_groups: The foreign key "mytbl6_col61_fkey" on the table "myschema2.mytbl6" references the table "myschema2.mytbl7" that is outside the groups (myGroup2).
WARNING: _check_fk_groups: The table "myschema2.mytbl6" is referenced by the foreign key "mytbl8_col81_fkey" on the table "myschema2.mytbl8" that is outside the groups (myGroup2).
rlbk_severity | rlbk_message
---------------+-------------------------------------------------
Notice | 3 tables and 2 sequences effectively processed.
(1 row)

--
select * from emaj.emaj_rollback_group('myGroup2','M3',false) order by 1,2;
WARNING: _check_fk_groups: Foreign key "mytbl6_col61_fkey", from table "myschema2.mytbl6", references "myschema2.mytbl7" that is outside groups (myGroup2).
WARNING: _check_fk_groups: table "myschema2.mytbl6" is referenced by foreign key "mytbl8_col81_fkey" from table "myschema2.mytbl8" that is outside groups (myGroup2).
WARNING: _check_fk_groups: The foreign key "mytbl6_col61_fkey" on the table "myschema2.mytbl6" references the table "myschema2.mytbl7" that is outside the groups (myGroup2).
WARNING: _check_fk_groups: The table "myschema2.mytbl6" is referenced by the foreign key "mytbl8_col81_fkey" on the table "myschema2.mytbl8" that is outside the groups (myGroup2).
rlbk_severity | rlbk_message
---------------+-------------------------------------------------
Notice | 3 tables and 2 sequences effectively processed.
Expand Down Expand Up @@ -2274,38 +2274,38 @@ select * from emaj.emaj_verify_all();
(1 row)

select emaj.emaj_create_group('dummyGroup');
ERROR: emaj_create_group: group "dummyGroup" is unknown in the emaj_group_def table. To create an empty group, explicitely set the third parameter to true.
ERROR: emaj_create_group: The group "dummyGroup" is unknown in the emaj_group_def table. To create an empty group, explicitely set the third parameter to true.
CONTEXT: PL/pgSQL function emaj.emaj_create_group(text,boolean,boolean) line 31 at RAISE
select emaj.emaj_drop_group('dummyGroup');
ERROR: _drop_group: group "dummyGroup" does not exist.
ERROR: _drop_group: The group "dummyGroup" does not exist.
CONTEXT: PL/pgSQL function emaj._drop_group(text,boolean) line 20 at RAISE
SQL statement "SELECT emaj._drop_group(v_groupName, FALSE)"
PL/pgSQL function emaj.emaj_drop_group(text) line 12 at SQL statement
select emaj.emaj_force_drop_group('dummyGroup');
ERROR: _drop_group: group "dummyGroup" does not exist.
ERROR: _drop_group: The group "dummyGroup" does not exist.
CONTEXT: PL/pgSQL function emaj._drop_group(text,boolean) line 20 at RAISE
SQL statement "SELECT emaj._drop_group(v_groupName, TRUE)"
PL/pgSQL function emaj.emaj_force_drop_group(text) line 17 at SQL statement
select emaj.emaj_get_previous_mark_group('dummyGroup', '2010-01-01');
ERROR: emaj_get_previous_mark_group (2): group "dummyGroup" does not exist.
ERROR: emaj_get_previous_mark_group (2): The group "dummyGroup" does not exist.
CONTEXT: PL/pgSQL function emaj.emaj_get_previous_mark_group(text,text) line 14 at RAISE
select emaj.emaj_get_previous_mark_group('dummyGroup', 'EMAJ_LAST_MARK');
ERROR: emaj_get_previous_mark_group (2): group "dummyGroup" does not exist.
ERROR: emaj_get_previous_mark_group (2): The group "dummyGroup" does not exist.
CONTEXT: PL/pgSQL function emaj.emaj_get_previous_mark_group(text,text) line 14 at RAISE
select * from emaj.emaj_log_stat_group('dummyGroup', 'dummyMark', NULL);
ERROR: emaj_log_stat_group: group "dummyGroup" does not exist.
ERROR: emaj_log_stat_group: The group "dummyGroup" does not exist.
CONTEXT: PL/pgSQL function emaj.emaj_log_stat_group(text,text,text) line 25 at RAISE
select * from emaj.emaj_detailed_log_stat_group('dummyGroup', 'dummyMark', NULL);
ERROR: emaj_detailed_log_stat_group: group "dummyGroup" does not exist.
ERROR: emaj_detailed_log_stat_group: The group "dummyGroup" does not exist.
CONTEXT: PL/pgSQL function emaj.emaj_detailed_log_stat_group(text,text,text) line 27 at RAISE
select emaj.emaj_estimate_rollback_group('dummyGroup', 'dummyMark', TRUE);
ERROR: _rlbk_check: group "dummyGroup" does not exist.
ERROR: _rlbk_check: The group "dummyGroup" does not exist.
CONTEXT: PL/pgSQL function emaj._rlbk_check(text[],text,boolean,boolean) line 23 at RAISE
SQL statement "SELECT emaj._rlbk_check(v_groupNames, v_mark, TRUE, TRUE)"
PL/pgSQL function emaj._estimate_rollback_groups(text[],text,boolean) line 16 at SQL statement
PL/pgSQL function emaj.emaj_estimate_rollback_group(text,text,boolean) line 8 at RETURN
select emaj.emaj_estimate_rollback_groups(array['dummyGroup'], 'dummyMark', FALSE);
ERROR: _rlbk_check: group "dummyGroup" does not exist.
ERROR: _rlbk_check: The group "dummyGroup" does not exist.
CONTEXT: PL/pgSQL function emaj._rlbk_check(text[],text,boolean,boolean) line 23 at RAISE
SQL statement "SELECT emaj._rlbk_check(v_groupNames, v_mark, TRUE, TRUE)"
PL/pgSQL function emaj._estimate_rollback_groups(text[],text,boolean) line 16 at SQL statement
Expand Down

0 comments on commit 737cd4d

Please sign in to comment.