Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support for CockroachDB #1743

Open
andyfrith-rm opened this issue Mar 10, 2023 · 1 comment
Open

[FEATURE] Support for CockroachDB #1743

andyfrith-rm opened this issue Mar 10, 2023 · 1 comment
Labels
DDL DDL statement related exotic

Comments

@andyfrith-rm
Copy link

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

@manticore-projects
Copy link
Contributor

manticore-projects commented Mar 11, 2023

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.

@manticore-projects manticore-projects added DDL DDL statement related exotic labels Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DDL DDL statement related exotic
Projects
None yet
Development

No branches or pull requests

2 participants