Обсуждение: Table dependencies
Hi I need to make a change to a table that many stored procedures depend on. Is there an automatic way of finding all the functions that depend on a certain table? I have tried the dependents and dependencies report in pgAdmin but these do not include functions. Thank you in advance, Kaarel
Hello no but, you can search tablename in source code - all stored procedures store src in pg_proc.prosrc column regards Pavel Stehule 2009/4/14 Kaarel Kitsemets <krl@klaabu.com>: > Hi > > I need to make a change to a table that many stored procedures depend on. Is > there an automatic way of finding all the functions that depend on a certain > table? > I have tried the dependents and dependencies report in pgAdmin but these do > not include functions. > > Thank you in advance, > Kaarel > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general >
In response to Kaarel Kitsemets : > Hi > > I need to make a change to a table that many stored procedures depend > on. Is there an automatic way of finding all the functions that depend > on a certain table? Not really, but for functions written not in C you can ask the column prosrc from the table pg_proc if there occur the table-name. HTH, Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
Thank you. That worked for me :) Kaarel Pavel Stehule wrote: > Hello > > no > > but, you can search tablename in source code - all stored procedures > store src in pg_proc.prosrc column > > regards > Pavel Stehule > > 2009/4/14 Kaarel Kitsemets <krl@klaabu.com>: > >> Hi >> >> I need to make a change to a table that many stored procedures depend on. Is >> there an automatic way of finding all the functions that depend on a certain >> table? >> I have tried the dependents and dependencies report in pgAdmin but these do >> not include functions. >> >> Thank you in advance, >> Kaarel >> >> -- >> Sent via pgsql-general mailing list (pgsql-general@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-general >> >>