Re: List Functions and Code - Mailing list pgsql-general

From Adrian Klaver
Subject Re: List Functions and Code
Date
Msg-id 201107280643.29718.adrian.klaver@gmail.com
Whole thread Raw
In response to List Functions and Code  (Rebecca Clarke <rebecca@clarke.net.nz>)
List pgsql-general

On Thursday, July 28, 2011 6:31:32 am Rebecca Clarke wrote:

> Hi

>

> I want to search and list all the functions in a database that reference a

> particular table within its code. Is there a way to do this?

>

> I can list all the functions from pg_proc, however there is nothing there

> which provides the code of the function, so therefore I can't query if it

> mentions a table. I've tried looking in information_schema.routines but

> this unfortunately does not have it either.

>

> Rebecca

http://www.postgresql.org/docs/9.0/interactive/catalog-pg-proc.html

prosrc in pg_proc should, with the following caveat from the docs:

"For compiled functions, both built-in and dynamically loaded, prosrc contains the function's C-language name (link symbol). For all other currently-known language types, prosrc contains the function's source text. probin is unused except for dynamically-loaded C functions, for which it gives the name of the shared library file containing the function. "

--

Adrian Klaver

adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: issue with pg_restore
Next
From: Pavel Stehule
Date:
Subject: Re: List Functions and Code