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

Поиск
Список
Период
Сортировка
От Peter van Hardenberg
Тема Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Дата
Msg-id CABTbUpg88-oCZkOaR7eff++rP15TF-5B7WOaykcAbzEL4T7EeQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Tue, Jul 26, 2016 at 6:15 PM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 7/26/16 6:14 PM, Vik Fearing wrote:
> As mentioned elsewhere in the thread, you can just do WHERE true to get
> around it, so why on Earth have it PGC_SUSET?

I'm not sure whether it's supposed to guard against typos and possibly
buggy SQL string concatenation in application code.  So it would help
against accidental mistakes, whereas putting a WHERE TRUE in there would
be an intentional override.


I know I'm late to the thread here, but I just wanted to add my small voice in support 
of this feature.

Over the years we've seen this happen at Heroku quite a bit (accidental manual entry
without a where clause) and the only minor gripe I'd have is that contrib modules are
very undiscoverable and users tend not to find out about them.

On the other hand, a session setting in core would probably not be that different. 

I expect Heroku will probably wind up enabling this by default on any interactive 
psql sessions.

(And I would encourage packagers and distributors to consider doing the same.)

-p 

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

Предыдущее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [Patch] RBTree iteration interface improvement
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Why we lost Uber as a user