Re: [HACKERS] Efficient DELETE Strategies

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>, pgsql-sql(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Efficient DELETE Strategies
Date: 2002-06-10 17:33:48
Message-ID: 1023730428.4092.64.camel@taru.tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

On Mon, 2002-06-10 at 15:56, Tom Lane wrote:
> Christoph Haller <ch(at)rodos(dot)fzk(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2002-06-10 18:12:08 Re: Timestamp/Interval proposals: Part 2
Previous Message Bruce Momjian 2002-06-10 17:33:01 Re: Project scheduling issues (was Re: Per tuple overhead,

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2002-06-10 18:33:45 Re: [HACKERS] Efficient DELETE Strategies
Previous Message Jan Wieck 2002-06-10 17:20:10 Re: [SQL] VIEWs and FOREIGN keys