Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYzr2-0001ZQ-I3 for pgsql-general@arkaria.postgresql.org; Sat, 22 Jul 2017 19:14:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dYzr2-0005ks-0G for pgsql-general@arkaria.postgresql.org; Sat, 22 Jul 2017 19:14:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dYzod-0001Qy-Bj for pgsql-general@postgresql.org; Sat, 22 Jul 2017 19:11:51 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dYzoa-0004Av-N1 for pgsql-general@postgresql.org; Sat, 22 Jul 2017 19:11:50 +0000 Received: by mail-wm0-x22e.google.com with SMTP id w126so34136487wme.0 for ; Sat, 22 Jul 2017 12:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=UNIc9+kJeyDTHdul4qpQ3uukyH3B5FSqxyH8ZyBPt2g=; b=V8oUGZ7SttIEO6x/5sgoP+1WvYOZu1ulBllDEOOQFklo+Rt2Kt0fjdqeuVBrouMc9o Tfevo+RPvpnVfQyZgWbvhD9zUC1npIDp7oH+SX+kb87htLyvYeaJ6oFrNhmrthKEpPMo Q9Bf/0g3d7GnkTTPi50Y0a+KN8pkIwtDUT/1HHJWrJqDeVGlKxhbkhZJr9YmUJh2C/3z eIIuRdwLzOF9Oac8Mnw04PzOFE/ZllLQzpu8nOkbBGtRjgl97XOl8OgOsqvbCWm2lOFk +7szvSDrfvT8TD+tGJe4+CKDWVrbfU2CsyeOvOK084VwPfGtXA+ZkDkbdRVXEQjIYtI9 4ppQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=UNIc9+kJeyDTHdul4qpQ3uukyH3B5FSqxyH8ZyBPt2g=; b=QOg2HxoKl/0Jgk8AXtgB9S6mRWe0BmleOTMLkxVKk1AAXqUpdYq3AEGJG4UcJFrTml +0MB5LYlPp68Cb4ayZz+1abcAY7V7Hd4Yy1BwWySzr+SaM+H5cR09QBfc6anvgJpCWL6 zVvADjCNEcv7oomcjJOVa+hCc75t7NtWMMDfA/xnH7SCfrZiJJa8Se5V6PGj9gPjlb1w 5Y9spOkfWBzM9EtkYdjDMMbUnpoC6+2GMHD7LHsNt+1kHL6aQWsk1obF+oGlDCcVTxJ3 CPCacLL/HJK1AVrIoVxQ5bqxByM62kBx8SIsQ5a6m4V8+/DpftRe5ThiqdXIUn6tP8ZA saIg== X-Gm-Message-State: AIVw1112WCiCrxfLWBJuZGA1m3z+NonNRTMuo5zDyD8MOWAH0anjVnKg bHBJxmC9yCGNINYG X-Received: by 10.28.66.14 with SMTP id p14mr18849wma.174.1500750706094; Sat, 22 Jul 2017 12:11:46 -0700 (PDT) Received: from gmail.com ([2a02:587:a41c:6300:6666:b3ff:fefa:f1f7]) by smtp.gmail.com with ESMTPSA id m72sm4134746wmg.16.2017.07.22.12.11.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Jul 2017 12:11:45 -0700 (PDT) Date: Sat, 22 Jul 2017 22:11:42 +0300 From: Greg Atkins To: pgsql-general@postgresql.org Subject: pg_dump not dropping event trigger Message-ID: <20170722191142.yi4e7tzcg3iacclg@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org I have a DB with an event trigger, which I am dumping with pg_dump -Fc --no-acl --no-owner [db_name] > [dump_file] In my dump file, I can't find any DROP EVENT TRIGGER statement. In src/bin/pg_dump/pg_dump.c, dumpEventTrigger() calls ArchiveEntry() with a "" argument for the dropStmt parameter. Is it intended to create an entry with no DROP statement? To be more precise, my scenario is the following: * I wish to backup & restore a DB which contains an event trigger * I can't drop the DB and re-create it before restoring * I can't have CREATE EVENT TRIGGER throw errors about the trigger already existing What is the recommended procedure? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general