> On Friday, October 8, 2021 7:05 PM Amit Kapila <amit.kapil...@gmail.com> > wrote: > > v37-0003-Tests-for-FOR-ALL-TABLES-IN-SCHEMA-publication > 3. > --- a/src/bin/pg_dump/t/002_pg_dump.pl > +++ b/src/bin/pg_dump/t/002_pg_dump.pl > .. > + 'ALTER PUBLICATION pub3 ADD ALL TABLES IN SCHEMA dump_test' => { > + create_order => 51, > + create_sql => > + 'ALTER PUBLICATION pub3 ADD ALL TABLES IN SCHEMA dump_test;', > + regexp => qr/^ > + \QALTER PUBLICATION pub3 ADD ALL TABLES IN SCHEMA dump_test;\E > + /xm, > + like => { %full_runs, section_post_data => 1, }, > + unlike => { exclude_dump_test_schema => 1, }, > > In this test, won't it exclude the schema dump_test because of unlike? > If so, then we don't have coverage for "ALL Tables In Schema" except > for public schema? >
Yes, the unlike case will exclude the schema dump_test, but I think schema dump_test could be dumped in like case. I checked the log file src/bin/pg_dump/tmp_check/log/regress_log_002_pg_dump and saw some cases were described as "should dump ALTER PUBLICATION pub3 ADD ALL TABLES IN SCHEMA dump_test". I think in these cases schema dump_test would be dumped. Besides, a small comment on tab-complete.c: else if (Matches("CREATE", "PUBLICATION", MatchAny, "FOR", "ALL")) - COMPLETE_WITH("TABLES"); - else if (Matches("CREATE", "PUBLICATION", MatchAny, "FOR", "ALL", "TABLES") - || Matches("CREATE", "PUBLICATION", MatchAny, "FOR", "TABLE", MatchAny)) + COMPLETE_WITH("TABLES", "TABLE IN SCHEMA"); COMPLETE_WITH("TABLES", "TABLE IN SCHEMA"); -> COMPLETE_WITH("TABLES", "TABLES IN SCHEMA"); Regards Tang