Обсуждение: Table dependencies

Поиск
Список
Период
Сортировка

Table dependencies

От
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?
I have tried the dependents and dependencies report in pgAdmin but these
do not include functions.

Thank you in advance,
Kaarel

Re: Table dependencies

От
Pavel Stehule
Дата:
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
>

Re: Table dependencies

От
"A. Kretschmer"
Дата:
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

Re: Table dependencies

От
Kaarel Kitsemets
Дата:
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
>>
>>