UPDATE OR REPLACE?

Поиск
Список
Период
Сортировка
От dandl
Тема UPDATE OR REPLACE?
Дата
Msg-id 008501d203fe$6cda2d60$468e8820$@andl.org
обсуждение исходный текст
Ответы Re: UPDATE OR REPLACE?  (Michael Paquier <michael.paquier@gmail.com>)
Список 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

 

В списке pgsql-general по дате отправления:

Предыдущее
От: Patrick B
Дата:
Сообщение: Re: Vacuum Full - Questions
Следующее
От: Venkata B Nagothi
Дата:
Сообщение: Re: Vacuum Full - Questions