postgresql/src/bin
Tom Lane 4317e0246c Rewrite --section option to decouple it from --schema-only/--data-only.
The initial implementation of pg_dump's --section option supposed that the
existing --schema-only and --data-only options could be made equivalent to
--section settings.  This is wrong, though, due to dubious but long since
set-in-stone decisions about where to dump SEQUENCE SET items, as seen in
bug report from Martin Pitt.  (And I'm not totally convinced there weren't
other bugs, either.)  Undo that coupling and instead drive --section
filtering off current-section state tracked as we scan through the TOC
list to call _tocEntryRequired().

To make sure those decisions don't shift around and hopefully save a few
cycles, run _tocEntryRequired() only once per TOC entry and save the result
in a new TOC field.  This required minor rejiggering of ACL handling but
also allows a far cleaner implementation of inhibit_data_for_failed_table.

Also, to ensure that pg_dump and pg_restore have the same behavior with
respect to the --section switches, add _tocEntryRequired() filtering to
WriteToc() and WriteDataChunks(), rather than trying to implement section
filtering in an entirely orthogonal way in dumpDumpableObject().  This
required adjusting the handling of the special ENCODING and STDSTRINGS
items, but they were pretty weird before anyway.

Minor other code review for the patch, too.
2012-05-29 23:22:14 -04:00
..
initdb Don't override arguments set via options with positional arguments. 2012-04-17 18:30:34 -04:00
pg_basebackup Make pg_recievexlog by default loop on connection failures 2012-05-27 11:05:24 +02:00
pg_config Lots of doc corrections. 2012-04-23 22:43:09 -04:00
pg_controldata Move CRC tables to libpgport, and provide them in a separate include file. 2012-02-28 19:53:39 -05:00
pg_ctl pg_ctl: Sort signal list in --help output 2012-05-21 20:12:30 +03:00
pg_dump Rewrite --section option to decouple it from --schema-only/--data-only. 2012-05-29 23:22:14 -04:00
pg_resetxlog Realign some --help output to have better spacing between columns 2012-05-18 20:34:14 +03:00
pgevent Lots of doc corrections. 2012-04-23 22:43:09 -04:00
psql psql: Remove notice about readline from --version output 2012-05-27 22:48:20 +03:00
scripts Don't override arguments set via options with positional arguments. 2012-04-17 18:30:34 -04:00
Makefile Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00