Re: distinguish update from insert (on conflict)

2019-05-22 Thread Laurenz Albe
Justin Pryzby wrote: > Is it still impossible to distinguish whether a row was inserted vs updated ? > > 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. Maybe this answer can help you:

Re: distinguish update from insert (on conflict)

2019-05-22 Thread Adrian Klaver
On 5/21/19 7:37 PM, Justin Pryzby wrote: On Tue, May 21, 2019 at 06:57:36PM -0700, Adrian Klaver wrote: 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. Sorry, I mean with UPSERT / "INSE

Re: distinguish update from insert (on conflict)

2019-05-22 Thread Fabio Ugo Venchiarutti
On 22/05/2019 03:37, Justin Pryzby wrote: On Tue, May 21, 2019 at 06:57:36PM -0700, Adrian Klaver wrote: 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. Sorry, I mean with UPSERT / "

Re: distinguish update from insert (on conflict)

2019-05-21 Thread Justin Pryzby
On Tue, May 21, 2019 at 06:57:36PM -0700, Adrian Klaver wrote: > 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. Sorry, I mean with UPSERT / "INSERT .. ON CONFLICT DO UPDATE", is it po

Re: distinguish update from insert (on conflict)

2019-05-21 Thread Adrian Klaver
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: ht

distinguish update from insert (on conflict)

2019-05-21 Thread Justin Pryzby
Is it still impossible to distinguish whether a row was inserted vs updated ? 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