I've cleaned up the backend code a bit -- see attached. More yet to go
through; I'm mainly sending it out for you (and everyone, really) to
give your opinion on my changes so far.
(I split out the plpgsql checker for the time being into a separate
branch; I'll get on it after I get this part committed.)
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support