X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 417D1D1B516 for ; Thu, 9 Oct 2003 00:13:01 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 84199-01 for ; Wed, 8 Oct 2003 21:12:15 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 4B20CD1B50F for ; Wed, 8 Oct 2003 21:12:12 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 65784353F3; Wed, 8 Oct 2003 17:12:00 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 644D43520E; Wed, 8 Oct 2003 17:12:00 -0700 (PDT) Date: Wed, 8 Oct 2003 17:12:00 -0700 (PDT) From: Stephan Szabo To: Josh Berkus Cc: Dan Langille , pgsql-sql@postgresql.org Subject: Re: UPDATE one table with values from another In-Reply-To: <200310081637.57591.josh@agliodbs.com> Message-ID: <20031008170912.Y3825@megazone.bigpanda.com> References: <20031008180813.X53328@xeon.unixathome.org> <200310081637.57591.josh@agliodbs.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/99 X-Sequence-Number: 15499 On Wed, 8 Oct 2003, Josh Berkus wrote: > > UPDATE commit_log_ports_elements X IIRC, PostgreSQL doesn't like aliases of the update table, so I think you'll need to spell it out in the WHERE. > > SET X.needs_refresh = CLP.needs_refresh, > > X.port_version = CLP.port_version, > > X.port_revision = CLP.port_revision I don't think you need the X.'s here anyway, there's only one update table.