Re: MERGE ... RETURNING

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: MERGE ... RETURNING
Дата
Msg-id 5dde223210f37c68a81f8a91715e94526d99b443.camel@j-davis.com
обсуждение исходный текст
Ответ на MERGE ... RETURNING  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
On Sun, 2023-01-08 at 12:28 +0000, Dean Rasheed wrote:
> I considered allowing a separate RETURNING list at the end of each
> action, but rapidly dismissed that idea.

One potential benefit of that approach is that it would be more natural
to specify output specific to the action, e.g.

   WHEN MATCHED THEN UPDATE ... RETURNING 'UPDATE', ...

which would be an alternative to the special function pg_merge_action()
or "WITH WHEN".

I agree that it can be awkward to specify multiple RETURNING clauses
and get the columns to match up, but it's hard for me to say whether
it's better or worse without knowing more about the use cases.

Regards,
    Jeff Davis




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Potential memory leak in contrib/intarray's g_intbig_compress
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: MERGE ... RETURNING