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

Re: Passing arguments to views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Campbell <chris(at)bignerdranch(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Tino Wildenhain <tino(at)wildenhain(dot)de>, Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Passing arguments to views
Date: 2006-02-03 18:07:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Chris Campbell <chris(at)bignerdranch(dot)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

In response to

pgsql-hackers by date

Next:From: Josh BerkusDate: 2006-02-03 18:20:30
Subject: Re: Multiple logical databases
Previous:From: Chris CampbellDate: 2006-02-03 17:56:19
Subject: Re: Passing arguments to views

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