Re: [HACKERS] Efficient DELETE Strategies

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [HACKERS] Efficient DELETE Strategies
Дата
Msg-id 1023730428.4092.64.camel@taru.tm.ee
обсуждение исходный текст
Ответ на Re: Efficient DELETE Strategies  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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



В списке pgsql-sql по дате отправления:

Предыдущее
От: Olaf Frączyk
Дата:
Сообщение: Unicode and escaping single quotes
Следующее
От: terry@greatgulfhomes.com
Дата:
Сообщение: Re: [GENERAL] VIEWs and FOREIGN keys