Re: ON CONFLICT DO NOTHING on pg_dump - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: ON CONFLICT DO NOTHING on pg_dump
Date
Msg-id CAEepm=1MOmg52-e_74wMZVfmNoUy-725shs7t7frdDsNXvfkiA@mail.gmail.com
Whole thread Raw
In response to RE: ON CONFLICT DO NOTHING on pg_dump  ("Ideriha, Takeshi" <ideriha.takeshi@jp.fujitsu.com>)
Responses RE: ON CONFLICT DO NOTHING on pg_dump  ("Ideriha, Takeshi" <ideriha.takeshi@jp.fujitsu.com>)
List pgsql-hackers
On Wed, Jul 11, 2018 at 2:20 PM, Ideriha, Takeshi
<ideriha.takeshi@jp.fujitsu.com> wrote:
> I did regression tests (make check-world) and
> checked manually pg_dump --on-conflict-do-nothing works properly.
> Also it seems to me the code has no problem.
> This feature has advantage to some users with small code change.
>
> So I marked it as 'Ready for committer'.
> I'd like to wait and see committers opinions.

Yeah, it's not an earth-shattering feature, but it might occasionally
be useful and isn't complicated.

+        Add ON CONFLICT DO NOTHING clause in the INSERT commands.

I think this would be better as: Add <literal>ON CONFLICT DO
NOTHING</literal> to <command>INSERT</command> commands.

+    printf(_("  --on-conflict-do-nothing     dump data as INSERT
commands with ON CONFLICT DO NOTHING \n"));

That's slightly misleading... let's just use the same wording again,
eg "add ON CONFLICT DO NOTHING to INSERT commands".

                {"no-unlogged-table-data", no_argument,
&no_unlogged_table_data, 1},
+               {"on-conflict-do-nothing", no_argument,
&on_conflict_do_nothing, 1},

I was tempted to say that this should be in alphabetical order, but
then I noticed that these are only *almost* in alphabetical order, not
quite.  Oh well.

Here's the version I'd like to commit, if there are no objections.

-- 
Thomas Munro
http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] plpgsql - additional extra checks
Next
From: Tatsuro Yamada
Date:
Subject: Re: [HACKERS] PoC plpgsql - possibility to force custom or genericplan