Skip site navigation (1) Skip section navigation (2)

Re: review: CHECK FUNCTION statement

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: review: CHECK FUNCTION statement
Date: 2011-12-02 10:14:17
Message-ID: 1322820857.1658.16.camel@fsopti579.F-Secure.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On ons, 2011-11-30 at 10:53 -0500, Tom Lane wrote:
> I think the important point here is that we need to support more than
> one level of validation, and that the higher levels can't really be
> applied by default in CREATE FUNCTION because they may fail on perfectly
> valid code.

How would this work with anything other than PL/pgSQL in practice?

Here is an additional use case:  There are a bunch of syntax and style
checkers for Python: pylint, pyflakes, pep8, pychecker, and maybe more.
I would like to have a way to use these for PL/Python.  Right now I use
a tool I wrote called plpylint (https://github.com/petere/plpylint),
which pulls the source code out of the database and runs pylint on the
client, which works well enough, but what is being discussed here could
lead to a better solution.

So what I'd like to have is some way to say

        check all plpythonu functions [in this schema or whatever] using
        checker "pylint"

where "pylint" was previously defined as a checker associated with the
plpythonu language that actually invokes some user-defined function.

Also, what kind of report does this generate?



In response to

Responses

pgsql-hackers by date

Next:From: Albe LaurenzDate: 2011-12-02 10:52:19
Subject: Re: review: CHECK FUNCTION statement
Previous:From: Heikki LinnakangasDate: 2011-12-02 08:59:01
Subject: Re: bug of recovery?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group