> You would need to wrap the function creation calls into some automation to generate and store those diffs, comparing
itback, etc, but that may be doable. I would also generate new diffs right after major version updates of the database
(abefore and after of the output of pg_get_functiondef, applied to the stored diff?).
I wonder whether that would tie the sanity check to a particular PG version.
I mean, pg_get_functiondef output being a server runtime artifact it might
well change between server versions, no ?
Best,
Karsten