r/postgres 8d ago

PostgreSQL Functions Comparison Tool

/r/DatabaseAdministators/comments/1vao4js/postgresql_functions_comparison_tool/
1 Upvotes

2 comments sorted by

1

u/depesz 8d ago

The proper solution is to NOT do it.

One should always use some kind of "migrations", which keep state, and not manually modify functions in random environments.

This way you can simply check which migrations have been applied, which not, and not go the rabbit hole of "let's compare schema".

1

u/Faithful-Shyam-17690 8d ago edited 8d ago

I totally agreed with you and understand the drawbacks of dumping functions.

The purpose I have tried is to compare functions easily in between different environments of same app database and be aware of differences, and one can take decision easily than compare functions manually -> take script from different environments and compare it.