Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Date
Msg-id f5f248ee-9c47-7bec-0b56-5bcb2760f246@2ndquadrant.com
Whole thread Raw
In response to Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (David Fetter <david@fetter.org>)
Responses Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (David Fetter <david@fetter.org>)
Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE  (David Fetter <david@fetter.org>)
List pgsql-hackers
Review of the patch in the commit fest:

- Various naming/spelling inconsistencies: In the source, the module is require_where, the documentation titles it
require-where,the GUC parameters are requires_where.*, but incorrectly documented.
 

- Unusual indentation in the Makefile

- Needs tests

- Not sure about errcode(ERRCODE_CARDINALITY_VIOLATION), which is documented in the code as "this means something
returnedthe wrong number of rows".  I think ERRCODE_SYNTAX_ERROR or something from nearby there would be better.
 

- errhint() string should end with a period.

- The 7th argument of DefineCustomBoolVariable() is of type int, not bool, so passing false is somewhat wrong, even if
itworks.
 

- There ought to be a _PG_fini() function that undoes what _PG_init() does.

- The documentation should be expanded and clarified.  Given that this is a "training wheels" module, we can be extra
clearhere.  I would like to see some examples at least.
 

- The documentation is a bit incorrect about the ways to load this module.  shared_preload_libraries is not necessary.
session_and local_ (with prep) should also work.
 

- The claim in the documentation that only superusers can do things with this module is not generally correct.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Tuplesort merge pre-reading
Next
From: Stephen Frost
Date:
Subject: Re: Add support for restrictive RLS policies