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

Extend PostgreSQL support to CockroachDB #10550

Open
Xenthys opened this issue Jan 28, 2024 · 1 comment
Open

Extend PostgreSQL support to CockroachDB #10550

Xenthys opened this issue Jan 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Xenthys
Copy link

Xenthys commented Jan 28, 2024

Is your feature request related to a problem?

While CockroachDB (CRDB) offers a mostly PostgreSQL-compatible API, Bytebase isn't compatible due to the fact it relies on functions such as pg_table_size() that unfortunately do not exist in CRDB.

This makes the tool completely incompatible with CRDB due to its inability to list tables since the getListTableQuery function in backend/plugin/db/pg/sync.go depends on these PSQL-only functions:
Capture d’écran 2024-01-28 à 18 42 14

Describe the solution you'd like

I can imagine two solutions to make Bytebase compatible with CockroachDB:

  • Detect CockroachDB as a special flavor of PostgreSQL, like you have a version check.
  • Add CockroachDB as a separate database with its own driver, most of it could be copied.

It would certainly be cleaner to integrate CockroachDB as a separate database since its API is mostly compatible but doesn't use PostgreSQL at all under the hood. They still have many unsupported features, but for the ones they have you can definitely port them over from the existing PostgreSQL driver.

Additional context

No response

@Xenthys Xenthys added the enhancement New feature or request label Jan 28, 2024
@liuzongyang255
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants