pg_{dump,restore}: Refactor handling of conflicting options.
Nathan Bossart <nathan@postgresql.org>
pg_{dump,restore}: Refactor handling of conflicting options.
This commit makes use of the function added by commit b2898baaf7
for these applications' handling of conflicting options. It
doesn't fix any bugs, but it does trim several lines of code.
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Steven Niu <niushiji@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://postgr.es/m/CACJufxHDYn%2B3-2jR_kwYB0U7UrNP%2B0EPvAWzBBD5EfUzzr1uiw%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/pg_dumpall.c | modified | +1 −1 |
| src/bin/pg_dump/pg_dump.c | modified | +28 −41 |
| src/bin/pg_dump/pg_restore.c | modified | +52 −94 |
| src/bin/pg_dump/t/001_basic.pl | modified | +13 −13 |
| src/bin/pg_dump/t/002_pg_dump.pl | modified | +2 −2 |
| src/bin/pg_dump/t/007_pg_dumpall.pl | modified | +4 −4 |
Discussion
- Refactor handling of "-only" options in pg_dump, pg_restore 5 messages · 2026-03-02 → 2026-03-09