From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christoph Haller <ch@rodos.fzk.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Efficient DELETE Strategies
Date: Tue, 11 Jun 2002 10:28:40 -0400
Message-ID: <18946.1023805720@sss.pgh.pa.us> (raw)
In-Reply-To: <200206110918.LAA20463@rodos>
References: <200206110918.LAA20463@rodos>
Christoph Haller <ch@rodos.fzk.de> writes:
> Christopher Kings-Lynne wrote:
>> DELETE [LOW_PRIORITY | QUICK] table_name[.*] [,table_name[.*] ...]
>> FROM table-references
>> [WHERE where_definition]
>>
>> or
>>
>> DELETE [LOW_PRIORITY | QUICK]
>> FROM table_name[.*], [table_name[.*] ...]
>> USING table-references
>> [WHERE where_definition]
>>
>> The idea is that only matching rows from the tables listed before the FROM
>> or before the USING clause are deleted. The effect is that you can delete
>> rows from many tables at the same time and also have additional tables that
>> are used for searching.
> Sounds tempting. It is much more what I was asking for.
> Is there a collision with USING ( join_column_list ) ?
Good point --- that was a very poor choice of keyword by the MySQL guys.
I have absolutely no intention of getting into this "delete from
multiple tables" business --- I don't understand the semantics it should
have, and it would probably not be easy to do inside Postgres anyway.
It would seem that
DELETE [ FROM ] relation_expr [ alias_clause ]
[ FROM from_list ] where_clause
is the syntax that would be most nearly compatible with MSSQL and MySQL.
Does Oracle have anything comparable?
regards, tom lane
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: tgl@sss.pgh.pa.us, ch@rodos.fzk.de
Subject: Re: Efficient DELETE Strategies
In-Reply-To: <18946.1023805720@sss.pgh.pa.us>
* 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