Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint

Поиск
Список
Период
Сортировка
От Geoff Winkless
Тема Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint
Дата
Msg-id CAEzk6fd1VCy_E-N_RgyNRNJctr_Jp=2DOCSPc-gCFkx0xZUtEQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On 19 May 2015 at 21:57, Simon Riggs <simon@2ndquadrant.com> wrote:
It's not clear to me how a single INSERT could cause two or more UPDATEs. 

CREATE TABLE mytable (
  c1 int NOT NULL,
  c2 int NOT NULL,
  PRIMARY KEY (c1),
  UNIQUE (c2)​
 
​);

INSERT INTO mytable (c1, c2) (10, 20);​
INSERT INTO mytable (c1, c2) (11, 21);
​INSERT INTO mytable (c1, c2) (10, 21) ON CONFLICT DO UPDATE .....
Or did you mean from a coding point of view how it would be possible to implement?

​Geoff​

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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Typo in tablecmds.c
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: Change pg_cancel_*() to ignore current backend