On Fri, Jan 18, 2019 at 5:02 AM Surafel Temesgen <surafel3...@gmail.com> wrote: > On Fri, Jan 18, 2019 at 2:29 PM David Rowley <david.row...@2ndquadrant.com> > wrote: >> >> On Fri, 18 Jan 2019 at 19:29, Surafel Temesgen <surafel3...@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.