Search Postgresql Archives

Search for text in any function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings!
 
Can anyone suggest a query that will tell me the names of all functions (both trigger and normal) that contain a given string of text?
 
Here's what happened:
 
My company's database has a table named "charge" and a view named "availcharges" that returns all charges that are available.  The view's SELECT statement lists all fields in the charge table explictly.
 
We have two functions that use data in the charge table the same way:
 
declare
    ChargeRec charge%rowtype
begin
    select into ChargeRec * from availcharges
 
This used to work.  But then one of us added a field to the charge table, as the last field in the table.  The availcharges view was adjusted accordingly.  However, behind the scenes something changed.  I'm pretty sure that the view no longer returns fields in the same order.  My immediate fix was to suggest using either
 
declare
    ChargeRec record;
 
or
 
declare
    ChargeRec availcharges%rowtype;
 
Either one works. 
 
But I need to make sure that we don't get burned by this anywhere else.  Therefore, I would like to be able to find all functions that uses the phrase "charge%rowtype".  I haven't been able to find where the text of functions is stored. 
   
Thank you very much.
 
RobR
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux