pg-clone-schema
pg-clone-schema copied to clipboard
Multiple issues cloning views
Hi,
Found some problems when running pg-clone-schema
on my project:
- it does not handle the case where a normal view depends on a materialized view or vice-versa
- views which have indirect dependencies ('i') are not enumerated at all
-
CREATE OR REPLACE
cannot be used with materialized views
I made the script 'work' on my schema. But I had to comment out the whole 'Create Materialized views' part - probably loosing a lot of needed functionality. I don't know how to fix it properly.
I'm attaching the modified script. Please compare ignoring white space changes, I messed it up. It was based on rev 164279a
.
clone_schema_mod.sql.gz