MERGE RETURNING

Поиск
Список
Период
Сортировка
От Miles Elam
Тема MERGE RETURNING
Дата
Msg-id CAALojA-wDNCx-4XDTWfMouZZ5cNczMwzdWk79Jh7Ng5iBX+VfQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: MERGE RETURNING  (Simon Riggs <simon.riggs@enterprisedb.com>)
Список pgsql-general
Are there any plans to (or specific decisions not to) support a RETURNING clause on MERGE statements in future versions of Postgres? The only reference I could find in the mailing list archives was this comment, which suggested it was desired but simply not technically feasible at the time.


e.g.

MERGE INTO customer_account ca
USING (SELECT customer_id, transaction_value FROM recent_transactions) AS t
ON t.customer_id = ca.customer_id
WHEN MATCHED THEN
  UPDATE SET balance = balance + transaction_value
WHEN NOT MATCHED THEN
  INSERT (customer_id, balance)
  VALUES (t.customer_id, t.transaction_value)
RETURNING customer_account.*;

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Fwd: Change the auth. postgresql and GIS
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: MERGE RETURNING