Re: syntax for updating an aliased table

From: Andy Chambers <achambers(at)mcna(dot)net>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: syntax for updating an aliased table
Date: 2011-05-27 15:36:41
Message-ID: BANLkTim=-OE4GAWJ_QstKDYse-mguJ6w0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 26, 2011 at 1:40 PM, Rick Genter <rick(dot)genter(at)gmail(dot)com> wrote:
>
> The UPDATE statement when multiple tables are involved always drives me nuts.
> I think what you need to do is remove all of the "old." from the SET clause and use "triple." in the WHERE clause instead of "old." - and remove the old table alias from the UPDATE.

This worked. Thanks very much

--
Andy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-05-27 15:39:22 Re: copy record?
Previous Message Tom Lane 2011-05-27 15:28:11 Re: Is there any problem with pg_notify and memory consumption?