Re: proposal: new contrib module plpgsql's embeded sql validator - Mailing list pgsql-hackers

From Petr Jelínek
Subject Re: proposal: new contrib module plpgsql's embeded sql validator
Date
Msg-id 4E25D7E2.6090805@pjmodos.net
Whole thread Raw
In response to Re: proposal: new contrib module plpgsql's embeded sql validator  (Jim Nasby <jim@nasby.net>)
Responses Re: proposal: new contrib module plpgsql's embeded sql validator
List pgsql-hackers
On 07/17/2011 10:31 PM, Jim Nasby wrote:
> On Jul 7, 2011, at 11:31 PM, Pavel Stehule wrote:
>> a lazy deep SQL validation inside plpgsq functions is interesting
>> attribute. It allows to work with temporary tables and it make testing
>> and debugging harder, because lot of errors in embedded queries are
>> detected too late. I wrote a simple module that can to help little
>> bit. It is based on plpgsql plugin API and it ensures a deep
>> validation of embedded sql early - after start of execution. I am
>> thinking, so this plugin is really useful and it is example of plpgsql
>> pluging - that is missing in contrib.
> I think this should at least be a contrib module; it seems very useful.
>

Yes I agree this should be part of pg distribution.

But, I think we should add valitation hook to plpgsql plugin structure 
so that you don't have to actually execute the function to check it - 
curretly there are only executing hooks which is why the plugin only 
works when you the func (not good for automation).

--
Petr Jelinek


pgsql-hackers by date:

Previous
From: Gurjeet Singh
Date:
Subject: A few user-level questions on Streaming Replication and pg_upgrade
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: new contrib module plpgsql's embeded sql validator