Re: Order of Operations for Update Command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: simonwhite(at)dciphercomputing(dot)com
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Order of Operations for Update Command
Date: 2016-08-25 16:33:01
Message-ID: 13643.1472142781@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

simonwhite(at)dciphercomputing(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2016-08-25 22:41:43 Re: does md5 really help against sniffing?
Previous Message otter117 2016-08-25 16:29:00 undocumented feature or bug in subquery : psql (PostgreSQL) 9.4.6 on SLES12 SP1