Skip to content

[FEATURE] Support for CockroachDB #1743

Closed

Description

@rm-andyfrith

Grammar or Syntax Description

Can support be added for CockroachDB? It is based on Postgres however there are a few differences which means there are some SQL statements that are considered valid.

SQL Example

Example of missing SQL is the "USING" statement for https://www.cockroachlabs.com/docs/v22.1/hash-sharded-indexes

ALTER TABLE FEATURE_SWITCH_CONFIG ALTER PRIMARY KEY USING COLUMNS (FEATURE_NAME) USING HASH

Caused by: net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "USING" "USING"
    at line 1, column 53.

Additional context

Tested in version 4.5

Activity

  1. manticore-projects commented on Mar 11, 2023

    @manticore-projects
    Contributor

    Greetings.

    Unfortunately the whole ALTER TABLE statement needs a serious refactoring.

    ALTER TABLE ... ALTER PRIMARY KEY ... seems to be completely broken to me, not only regarding to your specific syntax.

    This thing is so messy, that I would only touch it when a sponsor shows up.

    We could maybe start with a SQL:2016 compliant implementation from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DDLDDL statement relatedexotic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions