Re: Efficient DELETE Strategies

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Manfred Koizar <mkoi-pg(at)aon(dot)at>
Cc: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Efficient DELETE Strategies
Date: 2002-06-12 14:49:26
Message-ID: 9663.1023893366@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Manfred Koizar <mkoi-pg(at)aon(dot)at> writes:
> Oracle basically supports (with slight variations between releases
> 7/8/9):
> DELETE [FROM] { table
> | view
> | ( subquery )
> }
> [alias] [WHERE ...] [returning_clause]

Bizarre. How are you supposed to delete from a subquery?

> According to the "SQL Quick Syntax Guide" the WHERE clause is not
> optional. Does anybody know, if this is a documentation bug?

Probably. SQL92 saith:

<delete statement: searched> ::=
DELETE FROM <table name>
[ WHERE <search condition> ]

<delete statement: positioned> ::=
DELETE FROM <table name>
WHERE CURRENT OF <cursor name>

so I could see where a sloppy reader might get confused...

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-06-12 14:57:46 Re: Timestamp problem
Previous Message Manfred Koizar 2002-06-12 14:03:39 Re: Efficient DELETE Strategies