PostgreSQL can show you directly only these dependencies:


You cannot check directly dependencies like:

  • table (view) -> function
  • table (view) column -> function
  • function -> function


If you are used to work with Oracle this could be rather unpleasant surprise for you. Because Oracle does all these checks.

But PostgreSQL does not parse whole source code of the stored function. When you create (replace) function PostgreSQL only check basic things like:

  • if there is not some “;” missing
  • if PL/pgSQL variables used in code exist
  • if all blocks (BEGIN-END/ IF-END IF etc.) are closed


PostgreSQL during creation (replace) of function does not check things like:

  • if table / view exists
  • if column exist
  • if you call other functions properly – number of parameters/ types of parameters
  • if you assign variables properly according to types


These possible errors you must check during your tests.

This also means that dependencies on function you must find using for example full text search.