Skip site navigation (1) Skip section navigation (2)

Re: DELETE using an outer join

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: DELETE using an outer join
Date: 2012-07-20 10:27:22
Message-ID: jubbqh$ekp$1@dough.gmane.org (view raw or flat)
Thread:
Lists: pgsql-sql
Sergey Konoplev, 20.07.2012 10:21:
> On Thu, Jul 19, 2012 at 6:52 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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




In response to

Responses

pgsql-sql by date

Next:From: Sergey KonoplevDate: 2012-07-20 10:47:03
Subject: Re: DELETE using an outer join
Previous:From: Sergey KonoplevDate: 2012-07-20 08:21:43
Subject: Re: DELETE using an outer join

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group