Skip to content

Materialized View Tables Incompatible with Table Command Regex #6

@erikreedstrom

Description

@erikreedstrom

The regex used to parse table commands identified below does not currently allow for creating a table based on a query. This prevents the use of tables as materialized views.

Example

create_table :long_query,
             as: "SELECT * FROM orders INNER JOIN line_items ON order_id=orders.id")

generates:

CREATE TABLE "long_query" AS
  SELECT * FROM orders INNER JOIN line_items ON order_id=orders.id

https://github.com/SchemaPlus/schema_plus_core/blob/master/lib/schema_plus/core/sql_struct.rb#L12-L14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions