From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Robins Tharakan <tharakan(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Per row status during INSERT .. ON CONFLICT UPDATE? |
Date: | 2015-05-19 20:20:25 |
Message-ID: | CAM3SWZTKnDgLc9FYTLR+LwJtoJ5F6_GqvWB5EyrbZM_Jm8XwZw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, May 19, 2015 at 1:07 PM, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:
> My use-case is to create an extra row for all UPDATEd rows (only), which is
> implemented in MSSQL by enveloping the MERGE with an INSERT (MERGE ...
> OUTPUT $action) WHERE $action = 'UPDATE'.
That could make sense. You can achieve something similar with per-row
triggers, perhaps.
> Am still to test, but looks like Thom's reply earlier could take care of my
> use-case, so we may need more people requesting this magic field, with a
> valid use-case.
I'm not opposed to it, but it's not a personal priority to implement
this. I don't think it's great practice to use the hidden fields like
that. I can't see anything other than a dedicated expression serving
this purpose, if there is ever a documented solution.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2015-05-19 20:21:38 | Re: Per row status during INSERT .. ON CONFLICT UPDATE? |
Previous Message | Peter Geoghegan | 2015-05-19 20:12:39 | Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint |