Re: Efficient DELETE Strategies - Mailing list pgsql-sql

From Tom Lane
Subject Re: Efficient DELETE Strategies
Date
Msg-id 9663.1023893366@sss.pgh.pa.us
Whole thread Raw
In response to Re: Efficient DELETE Strategies  (Manfred Koizar <mkoi-pg@aon.at>)
Responses Re: Efficient DELETE Strategies  (Manfred Koizar <mkoi-pg@aon.at>)
List pgsql-sql
Manfred Koizar <mkoi-pg@aon.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


pgsql-sql by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Efficient DELETE Strategies
Next
From: Stephan Szabo
Date:
Subject: Re: Timestamp problem