Re: pg_dump multi VALUES INSERT
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Surafel Temesgen <surafel3000@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>,
Fabien COELHO <coelho@cri.ensmp.fr>, Dmitry Dolgov <9erthalion6@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-01-18T14:34:35Z
Lists: pgsql-hackers
On Fri, Jan 18, 2019 at 5:02 AM Surafel Temesgen <surafel3000@gmail.com> wrote: > On Fri, Jan 18, 2019 at 2:29 PM David Rowley <david.rowley@2ndquadrant.com> wrote: >> >> On Fri, 18 Jan 2019 at 19:29, Surafel Temesgen <surafel3000@gmail.com> wrote: >> > this happen because i don't disallow the usage of --inserts and --rows-per-insert >> > option together.it should be error out in those case.i correct it in attached patch >> >> I don't think it should be an error. It's not like the two options >> conflict. I imagined that you'd need to specify you want --inserts and >> optionally could control how many rows per statement that would be put >> in those commands. I'd be surprised to be confronted with an error for >> asking for that. >> > > if you specified --inserts option you already specified the number of rows per statement which is 1 . > if more than one rows per statement needed it must be specified using --rows-per-insert > and specifying one row per statement using --inserts option at the same time specify > different number of rows per statement with --rows-per-insert option seems conflicting to me. So, the other way of looking at it - why do we even need an entirely new option. Modify --inserts to accept an optional integer value that defaults to 1 (I'm not sure how tricky dealing with optional option values is though...). --inserts-columns implies --inserts but if you want to change the number of rows you need to specify both (or add the same optional integer to --inserts-columns) David J.
Commits
-
Add pg_dumpall --rows-per-insert
- a193cbec1199 12.0 landed
-
pg_dump: allow multiple rows per insert
- 7e413a0f82c8 12.0 landed