If you right-click a Redshift Materialized View and create a drop/create script using the menu, the generated script contains a drop statement of "DROP VIEW .;". To drop a Redshift materialized view, the drop query should read "DROP MATERIALIZED VIEW .;".
To Reproduce
Steps to reproduce the behavior:
- Select a materialized view in the left-hand object selector. Right Click.
- Select "Script As"
- Select "Drop and Create To"
- Select "New Query Window"
- Note the initial line of the generated script. It is "DROP VIEW .;" which when executed against a materialized view throws an error.
ERROR: "" is not a view
HINT: Use DROP MATERIALIZED VIEW to remove a materialized view. 0.003 seconds. (Line 1).
Expected behavior
The drop query created in the script should read "DROP MATERIALIZED VIEW .;" with the selected schema and materialized view incorporated in the script.
Environment details (please complete the following information):
- Device: MacBook Pro M1
- OS: OSX 14.5 (23F79)
- SQLPro app Version: SQLPro Studio Version 2024.21 (Build 111093)
- Installation source: Website download
- Target database server: Amazon Redshift
Additional context
Please reference AWS documentation:
If you right-click a Redshift Materialized View and create a drop/create script using the menu, the generated script contains a drop statement of "DROP VIEW .;". To drop a Redshift materialized view, the drop query should read "DROP MATERIALIZED VIEW .;".
To Reproduce
Steps to reproduce the behavior:
ERROR: "" is not a view
HINT: Use DROP MATERIALIZED VIEW to remove a materialized view. 0.003 seconds. (Line 1).
Expected behavior
The drop query created in the script should read "DROP MATERIALIZED VIEW .;" with the selected schema and materialized view incorporated in the script.
Environment details (please complete the following information):
Additional context
Please reference AWS documentation: