pg-clone-schema icon indicating copy to clipboard operation
pg-clone-schema copied to clipboard

Multiple issues cloning views

Open samodadela opened this issue 5 months ago • 20 comments

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

samodadela avatar Sep 20 '24 19:09 samodadela