Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to rename a table in Redshift without propagating the change to dependent views?

I noticed that if you rename a table in Redshift the new name is automatically progagated to all the views that are based on that table.

Is there a way to prevent this behavior so that the view definition would contain the old table name?

like image 269
Mihai Tache Avatar asked Oct 23 '25 14:10

Mihai Tache


1 Answers

Looks like this feature was introduced to Redshift. See WITH NO SCHEMA BINDING in the Redshift docs.

CREATE VIEW i_am_view_are_you AS
SELECT good_column
FROM public.i_am_table
WITH NO SCHEMA BINDING
like image 103
segfault.py Avatar answered Oct 25 '25 20:10

segfault.py



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!