Order of execution

From: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Order of execution
Date: 2013-05-06 00:04:18
Message-ID: CAAY=A7_O9hitn_zE78AVgKOKPU8YGY2XwETdwLKdBiMz0fO=xQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have an UPDATE query which performs several opertions in one table.

UPDATE table01 SET
field1 = (query1 may contain any field),
field2 = (query1 may contain any field),
field3 = (query1 may contain any field)
WHERE (condition)

query1, query2 and query3 perform a logic to determine which records will
be updated. Does field1 updates first, then field2 and, lastly, field3? or
What is the order in which updates are executed? If I need fields to be
updated in a certain order, should I use 3 UPDATE commands instead?

Respectfully,
Jorge Maldonado

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jasen Betts 2013-05-06 09:07:05 Re: Order of execution
Previous Message Achilleas Mantzios 2013-05-02 07:45:50 Re: Correct implementation of 1:n relationship with n>0?