pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shoaib Mir <shoaibmir@gmail.com>
To: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Update query by joining multiple tables.
Date: Wed, 17 Jan 2007 20:01:00 +0500
Message-ID: <bf54be870701170701k323bad55j4f4a383112381a46@mail.gmail.com> (raw)
In-Reply-To: <20070117125511.GC19527@phlogiston.dyndns.org>
References: <82e1a9bd0701170320j14d4ebdagd66d8c9f095b0192@mail.gmail.com>
	<20070117125511.GC19527@phlogiston.dyndns.org>

Might be a view and then a rule attached with that can help you out with
doing updates using joins

--------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 1/17/07, Andrew Sullivan <ajs@crankycanuck.ca> wrote:
>
> On Wed, Jan 17, 2007 at 04:50:18PM +0530, Moiz Kothari wrote:
> > http://www.postgresql.org/docs/8.1/interactive/sql-update.html, it is
> not
> > specified if a join can be done between multiple tables to update a
> table, i
>
> Sure it is:
>
> A list of table expressions, allowing columns from other tables to
> appear in the WHERE condition and the update expressions.
>
> a
>
> --
> Andrew Sullivan  | ajs@crankycanuck.ca
> Users never remark, "Wow, this software may be buggy and hard
> to use, but at least there is a lot of code underneath."
>                 --Damien Katz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>

view thread (3+ messages)

Message-ID: <bf54be870701170701k323bad55j4f4a383112381a46@mail.gmail.com>
Permalink:  ../bf54be870701170701k323bad55j4f4a383112381a46@mail.gmail.com/
Also on:    postgresql.org/message-id/bf54be870701170701k323bad55j4f4a383112381a46@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: shoaibmir@gmail.com, ajs@crankycanuck.ca
  Subject: Re: Update query by joining multiple tables.
  In-Reply-To: <bf54be870701170701k323bad55j4f4a383112381a46@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox