Re: Passing arguments to views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Passing arguments to views
Date
Msg-id 27833.1138990042@sss.pgh.pa.us
Whole thread Raw
In response to Re: Passing arguments to views  (Chris Campbell <chris@bignerdranch.com>)
List pgsql-hackers
Chris Campbell <chris@bignerdranch.com> writes:
> I'm fine with those limitations. I can confirm that all of my  
> functions are not referencing tables that don't exist by doing a  
> CREATE OR REPLACE FUNCTION to reload each function. A pg_dump/ 
> pg_restore would accomplish this, but it would be nice to have a  
> "RELOAD FUNCTION" (or "REPARSE"? or "VERIFY"?) command that would  
> just re-parse the function's source code (like CREATE FUNCTION does)  
> and spit out errors if the function is referencing relations that  
> don't exist.

This is putting way too much trust in the behavior of a
PL-language-specific verifier function.  Anyway, you can do what you
want today:select fmgr_sql_validator(oid) from pg_proc where prolang = 14;
(Generalizing this to work for any language is left as an exercise
for the reader...)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Chris Campbell
Date:
Subject: Re: Passing arguments to views
Next
From: Josh Berkus
Date:
Subject: Re: Multiple logical databases