UPDATE OR REPLACE?

From: "dandl" <david(at)andl(dot)org>
To: "'pgsql-general'" <pgsql-general(at)postgresql(dot)org>
Subject: UPDATE OR REPLACE?
Date: 2016-09-01 03:10:39
Message-ID: 008501d203fe$6cda2d60$468e8820$@andl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sqlite has options to handle an update that causes a duplicate key. Is there anything similar in Postgres?

This is not an UPSERT. The scenario is an UPDATE that changes some key field so that there is now a duplicate key. In Sqlite this handled as:

UPDATE OR IGNORE table SET <etc>

UPDATE OR REPLACE table SET <etc>

And so on

See https://www.sqlite.org/lang_update.html.

Can Postgres do this?

Regards

David M Bennett FACS

_____

Andl - A New Database Language - andl.org

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Venkata B Nagothi 2016-09-01 03:57:13 Re: Vacuum Full - Questions
Previous Message Patrick B 2016-09-01 00:32:50 Re: Vacuum Full - Questions