mirror of https://github.com/citusdata/citus.git
Remove the GUC mention in the error message as this config is meant for advanced users
parent
31cdf27fd6
commit
e962113c63
|
@ -1352,11 +1352,9 @@ EnsureRelationHasNoTriggers(Oid relationId)
|
||||||
char *relationName = get_rel_name(relationId);
|
char *relationName = get_rel_name(relationId);
|
||||||
|
|
||||||
Assert(relationName != NULL);
|
Assert(relationName != NULL);
|
||||||
ereport(ERROR, (errmsg("cannot distribute relation \"%s\" because it has "
|
ereport(ERROR, (errmsg("cannot distribute relation \"%s\" because it "
|
||||||
"triggers and \"citus.enable_unsafe_triggers\" is "
|
"has triggers", relationName),
|
||||||
"set to \"false\"", relationName),
|
errhint("Consider dropping all the triggers on \"%s\" "
|
||||||
errhint("Consider setting \"citus.enable_unsafe_triggers\" "
|
|
||||||
"to \"true\", or drop all the triggers on \"%s\" "
|
|
||||||
"and retry.", relationName)));
|
"and retry.", relationName)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1171,7 +1171,7 @@ RegisterCitusConfigVariables(void)
|
||||||
&EnableUnsafeTriggers,
|
&EnableUnsafeTriggers,
|
||||||
false,
|
false,
|
||||||
PGC_USERSET,
|
PGC_USERSET,
|
||||||
GUC_STANDARD,
|
GUC_STANDARD | GUC_NO_SHOW_ALL,
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
DefineCustomBoolVariable(
|
DefineCustomBoolVariable(
|
||||||
|
|
|
@ -106,9 +106,9 @@ AFTER INSERT ON reference_table_1
|
||||||
FOR EACH ROW EXECUTE FUNCTION update_value();
|
FOR EACH ROW EXECUTE FUNCTION update_value();
|
||||||
-- below two should fail
|
-- below two should fail
|
||||||
SELECT create_distributed_table('distributed_table_1', 'value');
|
SELECT create_distributed_table('distributed_table_1', 'value');
|
||||||
ERROR: cannot distribute relation "distributed_table_1" because it has triggers and "citus.enable_unsafe_triggers" is set to "false"
|
ERROR: cannot distribute relation "distributed_table_1" because it has triggers
|
||||||
SELECT create_reference_table('reference_table_1');
|
SELECT create_reference_table('reference_table_1');
|
||||||
ERROR: cannot distribute relation "reference_table_1" because it has triggers and "citus.enable_unsafe_triggers" is set to "false"
|
ERROR: cannot distribute relation "reference_table_1" because it has triggers
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- test deparse logic for CREATE TRIGGER commands
|
-- test deparse logic for CREATE TRIGGER commands
|
||||||
-- via master_get_table_ddl_events
|
-- via master_get_table_ddl_events
|
||||||
|
|
|
@ -346,7 +346,7 @@ BEGIN;
|
||||||
FOR EACH ROW EXECUTE PROCEDURE update_value();
|
FOR EACH ROW EXECUTE PROCEDURE update_value();
|
||||||
-- show that we error out as we don't supprt triggers on distributed tables
|
-- show that we error out as we don't supprt triggers on distributed tables
|
||||||
SELECT create_distributed_table('citus_local_table_6', 'col_1');
|
SELECT create_distributed_table('citus_local_table_6', 'col_1');
|
||||||
ERROR: cannot distribute relation "citus_local_table_6" because it has triggers and "citus.enable_unsafe_triggers" is set to "false"
|
ERROR: cannot distribute relation "citus_local_table_6" because it has triggers
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- make sure that creating append / range distributed tables is also ok
|
-- make sure that creating append / range distributed tables is also ok
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
Loading…
Reference in New Issue