Re: insert on conflict postgres returning distinction
От | Adrian Klaver |
---|---|
Тема | Re: insert on conflict postgres returning distinction |
Дата | |
Msg-id | 8723a4ce-ee04-a52a-1ac7-eb4226b52712@aklaver.com обсуждение исходный текст |
Ответ на | insert on conflict postgres returning distinction (pinker <pinker@onet.eu>) |
Ответы |
Re: insert on conflict postgres returning distinction
Re: insert on conflict postgres returning distinction |
Список | pgsql-general |
On 8/12/20 7:23 AM, pinker wrote: > is there any way to distinct between updated and inserted rows in RETURNING > clause when ON CONFLICT UPDATE was used? Do you want to use that information immediately in the query or store it somewhere? If the first case I don't think that is possible. For the second then, I haven't tried it but, maybe a trigger using transition tables per example here: https://www.postgresql.org/docs/12/plpgsql-trigger.html Example 42.7. Auditing with Transition Tables > > > > -- > Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html > > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: