Essentially my issue is that I have an MV that works like this
create MATERIALIZED VIEW fake_mv as select * from other_fake_mv;
I want to swap out other_fake_mv for another MV with the same definition. I'm attempting to do it by renaming the original mv to some temp name, and the mv I'm trying to swap in to the original name like so:
ALTER TABLE other_fake_mv rename TO other_fake_mv_temp;
ALTER TABLE other_fake_mv_backup rename TO other_fake_mv;
The issue is that fake_mv still references the original other_fake_mv (now named other_fake_mv_temp) instead of the new other_fake_mv (other_fake_mv_backup). How do I get around this or explicitly for the reference to point the name instead of the table?