Search for text in any function

Поиск
Список
Период
Сортировка
От Rob Richardson
Тема Search for text in any function
Дата
Msg-id 04A6DB42D2BA534FAC77B90562A6A03DCD3E84@server.rad-con.local
обсуждение исходный текст
Ответы Re: Search for text in any function  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
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
 

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Aliasing syntax question
Следующее
От: Sam Mason
Дата:
Сообщение: Re: When adding millions of rows at once, getting out of disk space errors