pg-schema-diff icon indicating copy to clipboard operation
pg-schema-diff copied to clipboard

Better dependency tracking for non-sql functions

Open ewan-escience opened this issue 9 months ago • 11 comments

When trying out this product with the plan command, the program errors, because it seems to do some live validation of the plan. If I understand correctly what is happening, this generates errors because:

  1. some of the function are written in plpgsql, for which the program doesn't check its dependencies
  2. those functions seem to be created in alphabetical order, so some functions are created before their dependencies

One of the following would solve this:

  1. add flag is added that sets check_function_bodies = off before doing the validation
  2. add support for dependency checking of plpgsql functions
  3. don't validate the plan when the plan was created from two live databases (i.e. with both --dsn and --schema-source-dsn)

ewan-escience avatar May 06 '24 12:05 ewan-escience