Re: BUG #15338: pg_restore --disable-triggers --data-only AND schema for table is not set.

Sergei Kornilov <sk@zsrv.org>

From: Sergei Kornilov <sk@zsrv.org>
To: "nekomata@olegk.ca" <nekomata@olegk.ca>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2018-08-17T18:01:31Z
Lists: pgsql-bugs
Hello
I can confirm this and i got reproducible testcase:
create database bug15338;
\c bug15338
create schema testschema;
create table testschema.test (value text);
insert into testschema.test values ('bug 15338 verify');

Plain format looks good:
/usr/lib/postgresql/10/bin/pg_dump bug15338  --disable-triggers --data-only # all ok!

But custom and dir formats are wrong:
/usr/lib/postgresql/10/bin/pg_dump bug15338  --disable-triggers --data-only -Fc --file bug15338.pgdump
/usr/lib/postgresql/10/bin/pg_restore bug15338.pgdump --disable-triggers --data-only
Produces wrong ALTER TABLE test DISABLE TRIGGER ALL, not testschema.test

Current master has this bug too.

regards, Sergei


Commits

  1. Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands.