schemainspect icon indicating copy to clipboard operation
schemainspect copied to clipboard

include defaults in create function signature

Open joshainglis opened this issue 2 years ago • 0 comments

I noticed when altering the default value of a function parameter that migra didn't pick up that there had been a change. This was due to only using pg_get_function_identity_arguments() for the signature, which does not include defaults.

This change adds an extra column to the functions.sql query to get pg_get_function_arguments(p.oid) as function_arguments which is then used as the signature for the create function statement. We still use the identity arguments for dropping the function.

joshainglis avatar Jul 05 '22 23:07 joshainglis