Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YoBee-0004fE-W0 for pgsql-hackers@arkaria.postgresql.org; Fri, 01 May 2015 14:11:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YoBee-0007tX-Fd for pgsql-hackers@arkaria.postgresql.org; Fri, 01 May 2015 14:11:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YoBed-0007s4-7C for pgsql-hackers@postgresql.org; Fri, 01 May 2015 14:10:59 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YoBea-0002MV-Qu for pgsql-hackers@postgresql.org; Fri, 01 May 2015 14:10:58 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id 53292860002; Fri, 1 May 2015 16:10:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-4.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p54895C9D.dip0.t-ipconnect.de [84.137.92.157]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 22621860001; Fri, 1 May 2015 16:10:53 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 972BA100C30; Fri, 1 May 2015 16:10:52 +0200 (CEST) Date: Fri, 1 May 2015 16:10:52 +0200 From: Andres Freund To: Robert Haas Cc: Peter Geoghegan , hlinnaka , Jeff Janes , Stephen Frost , Dean Rasheed , Bruce Momjian , Pg Hackers Subject: Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 Message-ID: <20150501141052.GE22649@awork2.anarazel.de> References: <20150501135800.GC22649@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2015-05-01 10:06:42 -0400, Robert Haas wrote: > On Fri, May 1, 2015 at 9:58 AM, Andres Freund 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. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers