Re: poll: CHECK TRIGGER? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: poll: CHECK TRIGGER?
Date
Msg-id CA+TgmoYeVjv2K0Ru3Vy9J7LL1LOi79Cg6C+i60ftYUzt47gsMg@mail.gmail.com
Whole thread Raw
In response to Re: poll: CHECK TRIGGER?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: poll: CHECK TRIGGER?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Mar 9, 2012 at 3:15 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On tor, 2012-03-08 at 19:19 -0500, Robert Haas wrote:
>> On Thu, Mar 8, 2012 at 4:54 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
>> >      * It's not terribly important to me to be able to run checkers
>> >        separately.  If I wanted to do that, I would just disable or
>> >        remove the checker.
>>
>> Does this requirement mean that you want to essentially associate a
>> set of checkers with each language and then, when asked to check a
>> function, run all of them serially in an undefined order?
>
> Well, the more I think about it and look at this patch, the more I think
> that this would be complete overkill and possibly quite useless for my
> purposes.  I can implement the entire essence of this framework (except
> the plpgsql_checker itself, which is clearly useful) in 10 lines,
> namely:
>
> CREATE OR REPLACE FUNCTION pep8(src text) RETURNS text
> IMMUTABLE
> LANGUAGE plsh
> AS $$
> #!/bin/bash
>
> pep8 --ignore=W391 <(echo "$1") 2>&1 | sed -r 's/^[^:]*://'
> $$;
>
> SELECT proname, pep8(prosrc) FROM pg_proc WHERE prolang = ANY (SELECT oid FROM pg_language WHERE lanname LIKE
'%python%')ORDER BY 1; 
>
> I don't know what more one would need.

Well, I agree with you, but Tom disagrees, so that's why we're talking
about it...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [v9.2] sepgsql's DROP Permission checks
Next
From: Tom Lane
Date:
Subject: Re: Is it time for triage on the open patches?