Following this answer I learnt that I can disable syntax checking for an SQL function by setting check_function_bodies=false
.
In my case: Running an upgrade using Flyway where
- The order of function creation is not well defined
- Some functions use other functions yet to be created within the same upgrade.
My question is - is it possible to issue a "recheck" of such a function without having to actually call it - once all other dependencies are in place?
Something similar to Oracle's alter function ... compile
.
Ideally I would like to set check_function_bodies=false
at the beginning of the upgrade and then recheck every SQL function at the end of it.
I want to avoid having to:
- control the order in which scripts are run.
- re-run the function creation scripts
Things I tried:
- Doing a dummy
alter function
- Calling
pg_get_functiondef
plpgsql_check
is not supported – Gazelle