On Thu, Aug 3, 2017 at 9:01 AM, Rushabh Lathia <rushabh.lat...@gmail.com> wrote: > --unpartition-partitioned-table is very confusing.
+1. > I liked the previous option which is --use-partitioned-table > [partition-name, ...]. > The Only problem with --use-partitioned-table is, a user needs to specify > the > partition-name in the options list. Imagine if someone having 100's of > partitions then specifying those name is pg_dump option is a pain. Yeah, that won't work. > Rather than that: > > --use-partitioned-table [partitioned_name, ...] # if > names are omitted it defaults to all the partitioned tables. > > Here user need to specify the root relation name in the option - and any > partition table have that as a ROOT, will load the data through > top-parent-relation. We could do that, but I'm not sure it's a good idea to use getopt_long() with optional options. Sometimes that creates confusion -- is pg_dump --use-partitioned-table salad an attempt to dump the salad database with the --use-partitioned-table option, or an attempt to apply --use-partitioned-table only to partitions whose parent is the salad table? getopt_long() has an answer, but some people may guess incorrectly about what it is. I would be more inclined to make this a global option than something that modifies the behavior for certain tables; the only per-table flags we have right now are just to include/exclude individual tables. You could make --inserts or --no-unlogged-table-data apply to some but not all tables, but we didn't; why start here? I don't like the specific name --use-partitioned-table much either. Use it for what? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers