Re: automatic restore point - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: automatic restore point
Date
Msg-id CAMsGm5cbv6BwqzsUHGVDUvn5yMePhyZBCfPhND88QAWv6MqwOA@mail.gmail.com
Whole thread Raw
In response to Re: automatic restore point  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: automatic restore point
Re: automatic restore point
List pgsql-hackers
On 25 June 2018 at 21:33, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Mon, Jun 25, 2018 at 6:17 PM, Yotsunaga, Naoki <yotsunaga.naoki@jp.fujitsu.com> wrote:
​​
So what do you think about it? Do you think is it useful?

I'd rather spend effort making the initial execution of said commands less likely.  Something like:

TRUNCATE table YES_I_REALLY_WANT_TO_DO_THIS;
 
I think an optional setting making DELETE and UPDATE without a WHERE clause illegal would be handy. Obviously this would have to be optional for backward compatibility. Perhaps even just a GUC setting, with the intent being that one would set it in .psqlrc so that omitting the WHERE clause at the command line would just be a syntax error. If one actually does need to affect the whole table one can just say WHERE TRUE. For applications, which presumably have their SQL queries tightly controlled and pre-written anyway, this would most likely not be particularly useful.

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: PATCH: backtraces for error messages
Next
From: Amit Kapila
Date:
Subject: Re: Few cosmetic suggestions for commit 16828d5c (Fast Alter TableAdd Column...)