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