Skip to content

Documentation Error in REFRESH MATERIALIZED VIEW command #4270

@IrisesD

Description

@IrisesD

Hello team,

We found a documentation error in REFRESH MATERIALIZED VIEW command in https://www.h2database.com/html/commands.html#refresh_materialized_view.

Here in the documentation the synopsis is:

REFRESH MATERIALIZED VIEW [ IF EXISTS ] [schemaName.]viewName

Which is an error as we tried commands like:

REFRESH MATERIALIZED VIEW IF EXISTS SCHEMA1.VIEW_A;

and H2 engine reports a syntax error:

Syntax error in SQL statement "REFRESH MATERIALIZED VIEW [*]IF EXISTS SCHEMA1.VIEW_A"; expected "identifier"; SQL statement: REFRESH MATERIALIZED VIEW IF EXISTS SCHEMA1.VIEW_A [42001-239]

which indicates that the IF EXISTS is not supported in REFRESH MATERIALIZED VIEW.
When we remove the IF EXISTS clause, the syntax error disappears.

This is an error in the documentation. The synopsis should be:

REFRESH MATERIALIZED VIEW [schemaName.]viewName

The environment we are using is the latest h2-2.3.239-SNAPSHOT.jar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions