Re: pg_dump multi VALUES INSERT

From: Surafel Temesgen <surafel3000(at)gmail(dot)com>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, 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-18 12:01:46
Message-ID: CALAY4q-rW4m6xpq5FkPqDOB_rb7SFTqWjXABpy1AbSh7bAhTSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 18, 2019 at 2:29 PM David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
wrote:

> On Fri, 18 Jan 2019 at 19:29, Surafel Temesgen <surafel3000(at)gmail(dot)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.

It might be worth doing the same as what we do if --column-inserts is
> specified without --inserts. In this case we just do:
>
> /* --column-inserts implies --inserts */
> if (dopt.column_inserts)
> dopt.dump_inserts = 1;
>
> If you do it that way you'll not need to modify the code much from how
> I wrote it. We can likely debate if we want --rows-per-insert to imply
> --inserts once there's a working patch.
>

version 3 of the patch work in similar way except it doesn't have two
option.

regards
Surafel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-01-18 12:41:42 Re: [HACKERS] Block level parallel vacuum
Previous Message Andrew Gierth 2019-01-18 11:37:30 Re: Ryu floating point output patch