Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcxat-0006Rz-4U for pgsql-docs@arkaria.postgresql.org; Thu, 25 Aug 2016 16:33:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bcxas-0002Ix-Nj for pgsql-docs@arkaria.postgresql.org; Thu, 25 Aug 2016 16:33:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bcxaW-0001uW-OZ for pgsql-docs@postgresql.org; Thu, 25 Aug 2016 16:33:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bcxaS-0003hY-Ou for pgsql-docs@postgresql.org; Thu, 25 Aug 2016 16:33:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u7PGX1ol013644; Thu, 25 Aug 2016 12:33:01 -0400 From: Tom Lane To: simonwhite@dciphercomputing.com cc: pgsql-docs@postgresql.org Subject: Re: Order of Operations for Update Command In-reply-to: <20160825152726.15674.18873@wrigleys.postgresql.org> References: <20160825152726.15674.18873@wrigleys.postgresql.org> Comments: In-reply-to simonwhite@dciphercomputing.com message dated "Thu, 25 Aug 2016 15:27:26 -0000" Date: Thu, 25 Aug 2016 12:33:01 -0400 Message-ID: <13643.1472142781@sss.pgh.pa.us> X-Pg-Spam-Score: -2.1 (--) 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 simonwhite@dciphercomputing.com writes: > Does the Update command update the columns in the order they are listed? Notionally, they're all done concurrently. This is embodied in our docs by defining the update source expressions thus: An expression to assign to the column. The expression can use the old values of this and other columns in the table. > Can an updated column's new value be used in the value calculation for a > subsequent column? No, see above. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs