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