Обсуждение: Can I search for text in a function?
Greetings!
Sometimes I need to track down how something happens in the database our application relies on, but whatever's happening may be buried in some old function that everybody here has forgotten about long ago. IIRC, functions are stored internally merely as fields in a table owned by the system. Is there a query I can use to find what function contains the string "previous_charge"?
Thank you very much.
Robert D. Richardson
Product Engineer Software
RAD-CON, Inc.
TECHNOLOGY: Innovative & Proven
Phone : +1.216.706.8905
Fax: +1.216.221.1135
Website: www.RAD-CON.com
E-mail: rob.richardson@RAD-CON.com
Вложения
Rob Richardson wrote: > Sometimes I need to track down how something happens in the database > our application relies on, but whatever's happening may be buried in > some old function that everybody here has forgotten about long ago. > IIRC, functions are stored internally merely as fields in a table > owned by the system. Is there a query I can use to find what function > contains the string "previous_charge"? > select proname from pg_proc where prosrc ilike '%previous_charge%'; klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: kgore4@une.edu.au
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Try: select * from pg_proc where lower(prosrc) like '%previous_charge%'; Sim Rob Richardson wrote: > Greetings! > > Sometimes I need to track down how something happens in the database our > application relies on, but whatever's happening may be buried in some > old function that everybody here has forgotten about long ago. IIRC, > functions are stored internally merely as fields in a table owned by the > system. Is there a query I can use to find what function contains the > string "previous_charge"? > > Thank you very much. > > *Robert D. Richardson > *Product Engineer Software > * > <file:///t:/Sales/Images/Marketing%20Pictures/Logos/LOGOs%20from%2010th%20Floor/RAD-CON%20Logo%20for%20Signature.jpg> > **RAD-CON, Inc. > **TECHNOLOGY: */Innovative & Proven > /Phone : +1.216.706.8905 > Fax: +1.216.221.1135 > Website: www.RAD-CON.com <http://www.rad-con.com/> > E-mail: rob.richardson@RAD-CON.com > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkihT50ACgkQjDX6szCBa+pQ8ACbBTLLep4RoyBNTC+PGij7TO2F Z4AAnA/UKoxyzzJYyK+6nePYp7S3AUN9 =2ntc -----END PGP SIGNATURE-----