Re: pg_dump multi VALUES INSERT

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Surafel Temesgen <surafel3000(at)gmail(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump multi VALUES INSERT
Date: 2019-01-23 23:25:55
Message-ID: CAKJS1f-vF0LVfsRnCCaiLe9KO_cD+u-3dBaxXueAU5ak1wHO1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Thu, 24 Jan 2019 at 04:45, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:

> I still do not understand the need for another variable.
>
> int ninserts = 0; // default is to use copy
> while (getopt...)
> {
> switch (...) {
> case "--inserts":
> if (ninserts == 0) ninserts = 1;
> break;
> case "--rows-per-insert":
> ninserts = arg_value;
> checks...
> break;
> ...

I didn't think of that. Attached is a version that changes it to work
along those lines.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
pg_dump-rows-per-insert-option_v12.patch application/octet-stream 13.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2019-01-24 00:28:36 Re: Thread-unsafe coding in ecpg
Previous Message Bruce Momjian 2019-01-23 23:21:45 Re: Protect syscache from bloating with negative cache entries