Feature request: stable order of lines in main.sql in multifile mode
It would be nice to have the lines in main.sql have a stable order so that changes in the order of the lines reflect a change in the contents of the database. I'm under the impression that right the order of lines is arbitrary (presumably subject to dependencies between the files).
Because there may be dependencies between the files, I assume this isn't as trivial to do as so request.
As you mentioned, this is non-trivial. pgschema maintains its own canonical format. Both order-wise or feature-wise (e.g. there are multiple ways to specify a unique key). What pgschema tries to achieve is to make the canonical format more intuitive so that users are more likely follow it.
Sounds like you wouldn't necessarily be against this if I implemented it though (don't hold your breath)
This is a desired behavior, if you have a good idea to implement without introducing too much complexity, happy to discuss here.