Re: distinguish update from insert (on conflict)

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: distinguish update from insert (on conflict)
Date: 2019-05-22 01:57:36
Message-ID: 106c0789-7a13-7f9c-8d49-3562556bcdd8@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/21/19 6:34 PM, Justin Pryzby wrote:
> Is it still impossible to distinguish whether a row was inserted vs updated ?

You will need to be more specific.

On a hunch, see transition relation info here:
https://www.postgresql.org/docs/10/sql-createtrigger.html

>
> The latest I can see is here:
> https://wiki.postgresql.org/wiki/UPSERT#RETURNING_behavior
>
> ..but I'm hopeful that the 4 year old wiki page is out of date.
>
> Justin
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Justin Pryzby 2019-05-22 02:37:49 Re: distinguish update from insert (on conflict)
Previous Message Justin Pryzby 2019-05-22 01:34:28 distinguish update from insert (on conflict)