[GENERAL] pg_dump not dropping event trigger - Mailing list pgsql-general

From Greg Atkins
Subject [GENERAL] pg_dump not dropping event trigger
Date
Msg-id 20170722191142.yi4e7tzcg3iacclg@gmail.com
Whole thread Raw
Responses Re: [GENERAL] pg_dump not dropping event trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-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
itintended 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?



pgsql-general by date:

Previous
From: Arup Rakshit
Date:
Subject: [GENERAL] Exclude posts which was from blacklisted users Sql help
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] pg_dump not dropping event trigger