Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqINQ-0007Al-Ta for pgsql-docs@arkaria.postgresql.org; Sat, 01 Oct 2016 11:22:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bqINQ-0001lZ-Cz for pgsql-docs@arkaria.postgresql.org; Sat, 01 Oct 2016 11:22:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bqIN4-0001NF-4o for pgsql-docs@postgresql.org; Sat, 01 Oct 2016 11:22:22 +0000 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bqIN1-0003HJ-4N for pgsql-docs@postgresql.org; Sat, 01 Oct 2016 11:22:20 +0000 Received: by mail-lf0-x234.google.com with SMTP id t81so57239472lfe.0 for ; Sat, 01 Oct 2016 04:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joh-to.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=o9Ne2eNVn5Kr4dw0GiCWv4+/43uGuqV0298bo14x5f8=; b=JggK3PJlQeAqYfynS/QzrWML7F3bwb5vXFBKzyaBdZzOc8+uQfjEGuxFoh2nhiBwTS BAO2RUqzeHMzAGZ3LBk//iQoryV2tIdS3EDjPG2oirpF9gc5LKRLKCfxSW9dCcbHQyiC mrhXdMaFdJxG6k1UugGw5oYY+bdMVLgIGOtMt7NmURzXw1xiFYn9R092AIfGhzrjzvWc zW7yJh5urcDRnEya/EgGFw5Iq5bSwiDM07LULNMnCR5RZDCz3D+2+bFzVq1utS8EtqCN NjTuAd7sPakRdxRPVWq844RfserV93d90V2vJQornUmbDQ1xiAWt6xQOrH1USK2/FO7Y 2GFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=o9Ne2eNVn5Kr4dw0GiCWv4+/43uGuqV0298bo14x5f8=; b=mjpa9bFhemQS+XzzF8bGOhktiuGY5rEKEAt4LZeMHDnERwgSpG6jZyBd9qHxNtU10x NTWXge7/jR1CtAj/f4Klb250P0uN+9Qqi6JAxpIMBUart2UPuN0OH1YqZXKDzKOXFvBz LLN1b6nRoPFCnEvqVhV/mnXhKslEuBquvgr5NK0x3Hz/KaOwaH9oLueWvphp/dj1D5Bk j63GLFfMlkC4IfWqlGFphpVyn1AS4HVXMbOt5RUsJ2jIaBq1Ro5PMwiRJz8ieWrhs0rI /rVF6YNBFRNu1pIEtnftHVIYFkCPIXIRRthk2SOLNfSKeVYJ8fX3zQ7L1Lz9dHOxfbRQ Hgeg== X-Gm-Message-State: AA6/9RmMXaw7n3hjDuNuQRGW3pQDm97sVZH9L/4mqEUveDy3h7fin1BIMb8AXMIRbW+Bjg== X-Received: by 10.25.34.85 with SMTP id i82mr4348403lfi.141.1475320936331; Sat, 01 Oct 2016 04:22:16 -0700 (PDT) Received: from [172.20.10.2] (c-5eea21f2-74736162.cust.telenor.se. [94.234.33.242]) by smtp.googlemail.com with ESMTPSA id h35sm3626345ljh.38.2016.10.01.04.22.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Oct 2016 04:22:15 -0700 (PDT) Subject: Re: CTEs modifying the same table more than once To: Pantelis Theodosiou , pgsql-docs@postgresql.org References: From: Marko Tiikkaja Message-ID: <3a2cae10-2b5a-4f15-e257-0c985e423f0e@joh.to> Date: Sat, 1 Oct 2016 13:22:15 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On 2016-10-01 13:13, Pantelis Theodosiou wrote: > I answered that this is unpredictable behaviour but the docs state only the > update-update and update-delete cases explicitly and the general wording is > about 2 updates. It's documented[1] behavior: "All the statements are executed with the same snapshot (see Chapter 13), so they cannot "see" one another's effects on the target tables." .m [1] https://www.postgresql.org/docs/current/static/queries-with.html -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs