Thanks for looking at this again. On Sat, 2 Mar 2019 at 20:01, Fabien COELHO <coe...@cri.ensmp.fr> wrote: > Although I'm all in favor of checking the int associated to the option, I > do not think that it warrants three checks and messages. I would suggest > to factor them all as just one check and one (terse) message.
Yeah. I've been trying to keep that area sane for a while, so I agree that one message is fine. Done that way in the attached and put back the missing ERANGE check. > Option "--help" line: number of row*s* ? Oops. Fixed. > About the output: I'd suggest to indent one line per row, something like: > > INSERT INTO foo VALUES > (..., ..., ..., ...), > (..., ..., ..., ...), > (..., ..., ..., ...); Reasonable. Change it to that. I put a tab at the start of those lines. There's still the possibility that one 1 final row makes up the final INSERT. These will still span multiple lines. I don't think there's anything that can reasonably be done about that. > I'd suggest to add test tables with (1) no rows and (2) no columns but a > few rows, with multiple --table options. I didn't do that. I partially think that you're asking for tests to test existing behaviour and partly because perl gives me a sore head. Maybe Surafel want to do that? v17 attached. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
pg_dump-rows-per-insert-option-v17.patch
Description: Binary data