Skip to content

SHOW CREATE for materialized views returns incorrect DDL #80829

@TheodoorP

Description

@TheodoorP

Describe the problem
When trying to use SHOW CREATE on a materialized view, the generated DDL is no longer a materialized view but a normal view, and the internal rowid column is part of the column definition.

To Reproduce

  1. Create a materialized view:
CREATE MATERIALIZED VIEW test AS (SELECT 1 AS foo);
  1. Use SHOW CREATE:
SHOW CREATE test
  1. See that the DDL is no longer a materialized view and that the rowid column is now included.

Expected behavior
I would expect the DDL to create a materialized view without a rowid.

Additional data / screenshots
image

Environment:

  • CockroachDB version: 21.2.8
  • Server OS: any
  • Client app: any

Jira issue: CRDB-15494

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.E-easyEasy issue to tackle, requires little or no CockroachDB experienceO-communityOriginated from the communityT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)good first issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions