Skip to content

Redshift create Drop/Create script for Materialized View creates wrong drop script #1003

@DM1145

Description

@DM1145

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:

  1. Select a materialized view in the left-hand object selector. Right Click.
  2. Select "Script As"
  3. Select "Drop and Create To"
  4. Select "New Query Window"
  5. 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:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions