]> granicus.if.org Git - postgresql/commitdiff
Add assertion to quiet Coverity
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 15 May 2017 17:59:58 +0000 (13:59 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 15 May 2017 17:59:58 +0000 (13:59 -0400)
src/backend/commands/subscriptioncmds.c

index 21ef15fa0fa70f1bff24ddb31380ab08eb47766e..304ac842a55fcf5552528471b3a9fb818842c2ba 100644 (file)
@@ -69,6 +69,9 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given,
        bool            create_slot_given = false;
        bool            copy_data_given = false;
 
+       /* If connect is specified, the others also need to be. */
+       Assert(!connect || (enabled && create_slot && copy_data));
+
        if (connect)
                *connect = true;
        if (enabled)