Add function dependencies

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Add function dependencies
Дата
Msg-id AANLkTikdBBJ1kaRKi=HK-YXkBQn2MyQ2Ju+t9bYme0w-@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add function dependencies  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
When a function is created, the system validates the syntax and
complains if any function the created function attempts to call is
missing.
I think this is really good, since it traps typos and warns you if you
have forgotten to install any functions your function depends on.

It would be equally useful if it warned you when trying to drop a
function other functions might depend on.

Currently, I do something like SELECT * FROM pg_proc WHERE prosrc LIKE
'%myfunc%' to verify nothing is using the function I'm about to drop.

Just like you can disable the creation check by setting
check_function_bodies to false,
I would suggest a similar option to disable the check upon dropping
functions, to disable the suggested dependency check.

Additionally, if pg_depend would reveal function dependencies, it
would be trivial to automatically generate function call digraphs in
.dot format, showing a nice call tree of your entire system.

-- 
Best regards,

Joel Jacobson
Glue Finance


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Compatibility GUC for serializable
Следующее
От: Shigeru HANADA
Дата:
Сообщение: Re: SQL/MED - file_fdw