INSERT and ON CONFLICT

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: INSERT and ON CONFLICT
Date: 2017-03-10 17:35:37
Message-ID: alpine.LNX.2.11.1703100930000.26081@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm filling a table with rows and have the first batch successfully
inserted. When I add more rows there may be some that already exist in the
table and I would prefer that they be ignored and the insert process
continue.

The syntax page for INSERT suggests that ON CONFLICT DO NOTHING is exactly
what I want to include in the command. Have I correctly interpreted what the
DO NOTHING option does when a row to be inserted already is present in the
table?

Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-03-10 18:24:53 Re: Upgradede -9.6.1 to -9.6.2; postmaster will not start
Previous Message Rich Shepard 2017-03-10 17:24:55 Upgradede -9.6.1 to -9.6.2; postmaster will not start