Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 16FB8475905 for ; Tue, 11 Jun 2002 10:28:59 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 5B568475864 for ; Tue, 11 Jun 2002 10:28:58 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g5BESfb18949; Tue, 11 Jun 2002 10:28:41 -0400 (EDT) To: Christoph Haller Cc: pgsql-sql@postgresql.org Subject: Re: Efficient DELETE Strategies In-reply-to: <200206110918.LAA20463@rodos> References: <200206110918.LAA20463@rodos> Comments: In-reply-to Christoph Haller message dated "Tue, 11 Jun 2002 11:18:34 +0700" Date: Tue, 11 Jun 2002 10:28:40 -0400 Message-ID: <18946.1023805720@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200206/129 X-Sequence-Number: 8094 Christoph Haller 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