From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Peter Geoghegan <pg(at)heroku(dot)com>, hlinnaka <hlinnaka(at)iki(dot)fi>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |
Date: | 2015-05-01 14:21:05 |
Message-ID: | 55438BD1.1020102@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
On 01/05/15 16:10, Andres Freund wrote:
> On 2015-05-01 10:06:42 -0400, Robert Haas wrote:
>> On Fri, May 1, 2015 at 9:58 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>> would you rather have EXCLUDED.data refer to the tuple version from
>>> VALUES (or a SELECT or ...) or to version from the BEFORE trigger?
>>
>> I think it would be completely shocking if it didn't refer to the
>> version returned by the BEFORE trigger. My interpretation of the
>> semantics of BEFORE triggers is that, once the trigger has fired and
>> returned a new tuple, things should proceed just as if that new tuple
>> were the one originally provided by the user.
>
> Well, it's a BEFORE INSERT trigger, not a BEFORE UPDATE, that's why I'm
> not so sure that argument applies.
>
> Peter also leaned in "your" direction and you apparently have a strong
> opinion on it... So I guess that'll be it unless somebody else weighs
> in.
>
FWIW I am also leaning towards what Robert says.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-05-01 14:21:27 | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |
Previous Message | Alanoly Andrews | 2015-05-01 14:12:08 | How to exclude blobs (large objects) from being loaded by pg_restore? |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-05-01 14:21:27 | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |
Previous Message | Bruce Momjian | 2015-05-01 14:14:13 | initdb start server recommendation |