Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATE and DELETE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Дата
Msg-id 24768.1486055650@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATEand DELETE  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATEand DELETE  (David Fetter <david@fetter.org>)
Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATEand DELETE  (Nico Williams <nico@cryptonector.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Pavel Stehule wrote:
>> Better to enhance this feature step by step.

> Agreed -- IMO this is a reasonable first step, except that I would
> rename the proposed extension so that it doesn't focus solely on the
> first step.

Quite.  The patch fails to make up its mind whether it's a trivial example
meant as a coding demonstration, or something that's going to become
actually useful.

In the category of "actually useful", I would put checks like "are there
unqualified outer references in subqueries".  That's something we see
complaints about at least once a month, I think, and it's the type of
error that even seasoned SQL authors can make easily.  But the current
patch is not extensible in that direction (checking for this in
post_parse_analyze_hook seems quite impractical).

Also, somebody who wants a check like that isn't necessarily going to want
"no WHERE clause" training wheels.  So you're going to need to think about
facilities to enable or disable different checks.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] TRAP: FailedAssertion("!(hassrf)", File: "nodeProjectSet.c", Line: 180)
Следующее
От: David Fetter
Дата:
Сообщение: Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATEand DELETE