Re: pg_dump multi VALUES INSERT - Mailing list pgsql-hackers

From David Rowley
Subject Re: pg_dump multi VALUES INSERT
Date
Msg-id CAKJS1f8+K8SuhZ_DtKx98CQ=TZs6cqQFURka8=L5MgBoW37xKw@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump multi VALUES INSERT  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pg_dump multi VALUES INSERT
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: "Jamison, Kirk"
Date:
Subject: RE: pgbench - doCustom cleanup
Next
From: Peter Geoghegan
Date:
Subject: Re: Should we increase the default vacuum_cost_limit?