pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: simonwhite@dciphercomputing.com
To: pgsql-docs@postgresql.org
Subject: Order of Operations for Update Command
Date: Thu, 25 Aug 2016 15:27:26 +0000
Message-ID: <20160825152726.15674.18873@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.5/static/sql-update.html
Description:

Does the Update command update the columns in the order they are listed? Can
an updated column&#39;s new value be used in the value calculation for a
subsequent column?
i.e. update mytable set qty=qty+5,price=price*1.1,subtotal=qty*price
Will the subtotal be calculated based on the old column values or the new
column values?

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


view thread (2+ messages)  latest in thread

Message-ID: <20160825152726.15674.18873@wrigleys.postgresql.org>
Permalink:  ../20160825152726.15674.18873@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20160825152726.15674.18873@wrigleys.postgresql.org

 · 

reply

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: simonwhite@dciphercomputing.com
  Subject: Re: Order of Operations for Update Command
  In-Reply-To: <20160825152726.15674.18873@wrigleys.postgresql.org>

* 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