pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: DELETE using an outer join
Date: Fri, 20 Jul 2012 12:27:22 +0200
Message-ID: <jubbqh$ekp$1@dough.gmane.org> (raw)
In-Reply-To: <CAL_0b1shAZWP76=jpA47MLJE4p3q9_FHnAAy9ki_gXk1kVYJuQ@mail.gmail.com>
References: <ju8veb$dkn$1@dough.gmane.org>
	<21289.1342709554@sss.pgh.pa.us>
	<CAL_0b1shAZWP76=jpA47MLJE4p3q9_FHnAAy9ki_gXk1kVYJuQ@mail.gmail.com>

Sergey Konoplev, 20.07.2012 10:21:
> On Thu, Jul 19, 2012 at 6:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Now I was wondering if a DELETE statement could be rewritten with the same "strategy":
>>
>> Not at the moment.  There have been discussions of allowing the same
>> table name to be respecified in USING, but there are complications.
>
> However it works.
>
> DELETE FROM some_table USING some_table AS s
> WHERE
>      some_table.col1 = s.col1 AND
>      some_table.col2 = s.col2 AND
>      some_table.id < s.id;
>
But that's not an outer join






view thread (9+ messages)  latest in thread

Message-ID: <jubbqh$ekp$1@dough.gmane.org>
Permalink:  ../jubbqh$ekp$1@dough.gmane.org/
Also on:    postgresql.org/message-id/jubbqh$ekp$1@dough.gmane.org

 · 

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: spam_eater@gmx.net
  Subject: Re: DELETE using an outer join
  In-Reply-To: <jubbqh$ekp$1@dough.gmane.org>

* 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