From: Tom Lane <tgl@sss.pgh.pa.us>
To: simonwhite@dciphercomputing.com
Cc: pgsql-docs@postgresql.org
Subject: Re: Order of Operations for Update Command
Date: Thu, 25 Aug 2016 12:33:01 -0400
Message-ID: <13643.1472142781@sss.pgh.pa.us> (raw)
In-Reply-To: <20160825152726.15674.18873@wrigleys.postgresql.org>
References: <20160825152726.15674.18873@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, simonwhite@dciphercomputing.com
Subject: Re: Order of Operations for Update Command
In-Reply-To: <13643.1472142781@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox