Interesting new function is possibility to return list of used relation and functions. With these information is easy to generate dependency graph:
postgres=# \sf fx CREATE OR REPLACE FUNCTION public.fx() RETURNS void LANGUAGE plpgsql AS $function$ begin perform upper(((plus(a) + 200) * 100)::text) from xx; end; $function$ postgres=# select * from plpgsql_show_dependency_tb('fx()'); ┌──────────┬───────┬────────┬──────┬───────────┐ │ type │ oid │ schema │ name │ params │ ╞══════════╪═══════╪════════╪══════╪═══════════╡ │ FUNCTION │ 18310 │ public │ plus │ (integer) │ │ RELATION │ 24576 │ public │ xx │ │ └──────────┴───────┴────────┴──────┴───────────┘ (2 rows)
Good see this new functionality, thanks
ReplyDelete