On Mar 19, 2023, at 10:49 PM, richard coleman <rcoleman.ascentgl@xxxxxxxxx> wrote: I wonder how difficult it would have been to create SQL functions out of what is basically psql or pg_dump magic. If you ignore the answers on StackOverflow that say to use pg_dump and "psql -E", there must be close to 10 other answers with various SQL functions which do exactly that here: I recommend you read through them and test them to find the best version. I hope one of them fits your needs. If so, I hope you report back here with which one you went with. :-) Hoping this helps, Ed |