On Wed Feb 11, 2026 at 5:51 PM -03, David G. Johnston wrote: >> I also want to mention that I don't think that we would be able to >> properly re-created 100% all objects from the source schema into the new >> schema. Some objects will be hard to copy and can still generate bougy >> objects like functions for example as David mention on [1] (we can >> support some kind of functions but some others will be hard). >> >> Another issue is to handle complex relations like the following: >> - Function A returns a boolean type >> - Custom DOMAIN type call function A on CHECK constraint >> - Function B return/use a type of custom DOMAIN >> >> What we should create first? It can have functions that depends on >> domains, so domains should be created first, but it can also have >> domains that depends on functions, so functions would need to be created >> first. This would be trick to fix. >> > > This is a solved problem in pg_dump, no? It understands and follows the > dependency graph. Even allows schema-only dumps. >
Yes, I think so. I was actually planning to look at pg_dump code to see what we can reuse to re-create the objects from source schema into the new schema. -- Matheus Alcantara EDB: https://www.enterprisedb.com
