Skip to content

Instantly share code, notes, and snippets.

@theory
Created August 8, 2019 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theory/0d7c56431035f7f4b8d6c6cd57cc77e0 to your computer and use it in GitHub Desktop.
Save theory/0d7c56431035f7f4b8d6c6cd57cc77e0 to your computer and use it in GitHub Desktop.
--- a/bucardo.schema
+++ b/bucardo.schema
@@ -73,8 +73,9 @@ RETURNS TRIGGER
LANGUAGE plpgsql
AS $bc$
BEGIN
-
- NEW.setting = LOWER(NEW.setting);
+ IF NEW.name <> ALL('{log_conflict_file,warning_file,email_debug_file,flatfile_dir,reason_file,stats_script_url,stopfile,log_timer_format}') THEN
+ NEW.setting = LOWER(NEW.setting);
+ END IF;
IF (NEW.type IS NOT NULL and NEW.item IS NULL) THEN
RAISE EXCEPTION 'Must provide a specific %', NEW.type;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment