From: Greg Atkins <void.is.meaning@gmail.com>
To: pgsql-general@postgresql.org
Subject: pg_dump not dropping event trigger
Date: Sat, 22 Jul 2017 22:11:42 +0300
Message-ID: <20170722191142.yi4e7tzcg3iacclg@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: void.is.meaning@gmail.com
Subject: Re: pg_dump not dropping event trigger
In-Reply-To: <20170722191142.yi4e7tzcg3iacclg@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox