Re: pg_dump multi VALUES INSERT
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Surafel Temesgen <surafel3000@gmail.com>,
Dmitry Dolgov <9erthalion6@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-03-04T23:58:31Z
Lists: pgsql-hackers
Attachments
- pg_dump-rows-per-insert-option-v17.patch (application/octet-stream) patch v17
Thanks for looking at this again. On Sat, 2 Mar 2019 at 20:01, Fabien COELHO <coelho@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
Commits
-
Add pg_dumpall --rows-per-insert
- a193cbec1199 12.0 landed
-
pg_dump: allow multiple rows per insert
- 7e413a0f82c8 12.0 landed