Table dependencies

Started by Kaarel Kitsemetsabout 17 years ago4 messagesgeneral
Jump to latest
#1Kaarel 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

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Kaarel Kitsemets (#1)
Re: Table dependencies

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>:

Show quoted text

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

#3A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Kaarel Kitsemets (#1)
Re: Table dependencies

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

#4Kaarel Kitsemets
krl@klaabu.com
In reply to: Pavel Stehule (#2)
Re: Table dependencies

Thank you.
That worked for me :)

Kaarel

Pavel Stehule wrote:

Show quoted text

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