Re: review: CHECK FUNCTION statement

Albe Laurenz <laurenz.albe@wien.gv.at>

From: "Albe Laurenz" <laurenz.albe@wien.gv.at>
To: "Pavel Stehule *EXTERN*" <pavel.stehule@gmail.com>
Cc: <pgsql-hackers@postgresql.org>
Date: 2012-01-04T14:27:08Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add const qualifiers to node inspection functions

Pavel Stehule wrote:
> here is new version of CHECK FUNCTION patch
> 
> I changed implementation of interface:
> 
> * checked functions returns table instead raising exceptions - it
> necessary for describing more issues inside one function - and it
> allow to use better structured data then ExceptionData

[...]

> * result of CHECK FUNCTION is simple table (like EXPLAIN - based on
> Tom proposition)

I don't have the time for a complete review, but I tried the patch
and found:

It is in context diff and applies to current master (there is fuzz 1
in one hunk). It contains documentation and regression tests.
Compiles without warnings and passes regression tests.

The two or three CHECK FUNCTIONs I ran worked ok.

The documentation (that I wrote) will need to get updated: currently
it states in two places that the checker function should throw a
warning if it encounters a problem.

Yours,
Laurenz Albe