Matt Mello <alien(at)spaceship(dot)com> writes:
> I see. One item I forgot to mention ... Both update statements have a
> where clause containing txn.terminalid=38. Txn.terminalid is a foreign
> key column in that table (txn.terminalid->terminal.terminalid). Could
> this be the source of the trouble?
Not per se. The problem depends on which rows get updated and in what
sequence --- the contents of the WHERE clause aren't the issue, except
insofar as they determine the set of rows to be updated.
regards, tom lane