On Mon, 2002-06-10 at 15:56, Tom Lane wrote:
> Christoph Haller <ch@rodos.fzk.de> writes:
> > Based on an entry in the mailing list from 30 Oct 2001
> > about efficient deletes on subqueries,
> > I've found two ways to do so (PostgreSQL 7.2.1):
> > ...
> > Is there a way to put the second form (more complicated, but faster)
> > in one statement?
> > Or is there even a third way to delete, which I cannot see?
...
> AFAIK this extension would be utterly trivial to implement, since all
> the machinery is there already --- for 99% of the backend, it doesn't
> matter whether a FROM-item is implicit or explicit. We'd only need to
> argue out what the syntax should be. I could imagine
>
> DELETE FROM relation_expr [ , table_ref [ , ... ] ]
> [ WHERE bool_expr ]
>
> or
>
> DELETE FROM relation_expr [ FROM table_ref [ , ... ] ]
> [ WHERE bool_expr ]
What about
DELETE relation_expr FROM relation_expr [ , table_ref [ , ... ] ] [ WHERE bool_expr ]
or
DELETE relation_expr.* FROM relation_expr [ , table_ref [ , ... ] ] [ WHERE bool_expr ]
--------------
Hannu