Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 36138475CFB; Mon, 10 Jun 2002 22:51:27 -0400 (EDT) Received: from barry.xythos.com (h-66-166-17-184.SNVACAID.covad.net [66.166.17.184]) by postgresql.org (Postfix) with ESMTP id 51956475A0C; Mon, 10 Jun 2002 22:51:25 -0400 (EDT) Received: from xythos.com (localhost.localdomain [127.0.0.1]) by barry.xythos.com (8.11.6/8.11.6) with ESMTP id g5B0PKZ01777; Mon, 10 Jun 2002 17:26:40 -0700 Message-ID: <3D05436F.5040008@xythos.com> Date: Mon, 10 Jun 2002 17:25:19 -0700 From: Barry Lind User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hannu Krosing Cc: Tom Lane , Christoph Haller , pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Efficient DELETE Strategies References: <200206101142.NAA16854@rodos> <5619.1023717387@sss.pgh.pa.us> <1023730428.4092.64.camel@taru.tm.ee> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200206/124 X-Sequence-Number: 8089 This Hannu Krosing wrote: > DELETE relation_expr FROM relation_expr [ , table_ref [ , ... ] ] > [ WHERE bool_expr ] This in some ways is similar to Oracle where the FROM is optional in a DELETE (ie. DELETE foo WHERE ...). By omitting the first FROM, the syntax ends up mirroring the UPDATE case: DELETE foo FROM bar WHERE ... UPDATE foo FROM bar WHERE ... However I think the syntax should also support the first FROM as being optional (even though it looks confusing): DELETE FROM foo FROM bar WHERE ... thanks, --Barry