From 36f3de3f5308d3c539fceeed7e14005c3465b4ef Mon Sep 17 00:00:00 2001 From: jalisson Date: Sat, 2 Oct 2021 18:27:12 -0300 Subject: [PATCH] Code from PR #273 --- .../utils/pgdiff/parsers/CreateTriggerParser.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/cz/startnet/utils/pgdiff/parsers/CreateTriggerParser.java b/src/main/java/cz/startnet/utils/pgdiff/parsers/CreateTriggerParser.java index f45bd514..a5cd58f3 100755 --- a/src/main/java/cz/startnet/utils/pgdiff/parsers/CreateTriggerParser.java +++ b/src/main/java/cz/startnet/utils/pgdiff/parsers/CreateTriggerParser.java @@ -108,14 +108,13 @@ public static void parse(final PgDatabase database, } parser.expect("EXECUTE"); - - if (parser.expectOptional("PROCEDURE")) { - trigger.setFunction(parser.getRest()); - } else if (parser.expectOptional("FUNCTION")) { - trigger.setFunction(parser.getRest()); + if (parser.expectOptional("PROCEDURE")) { + } else if (parser.expectOptional("FUNCTION")) { } else { parser.throwUnsupportedCommand(); } + + trigger.setFunction(parser.getRest()); final boolean ignoreSlonyTrigger = ignoreSlonyTriggers && ("_slony_logtrigger".equals(trigger.getName())