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

Alter table supports adding column as primary key #1308

Closed
killme2008 opened this issue Apr 3, 2023 · 0 comments
Closed

Alter table supports adding column as primary key #1308

killme2008 opened this issue Apr 3, 2023 · 0 comments
Assignees
Labels
C-enhancement Category Enhancements
Milestone

Comments

@killme2008
Copy link
Contributor

killme2008 commented Apr 3, 2023

What type of enhancement is this?

API improvement

What does the enhancement do?

The label or tag in TSDB protocol will be added to the primary key in GreptimeDB.
I think we can provide a dialect SQL to add primary column:

Combines:

alter table test add column new_tag STRING;
alter table test drop primary key;
alter table test add primary key (old_tag1, old_tag2, ..., new_tag);

Into:

alter table test add primary key column new_tag STRING;

Implementation challenges

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
None yet
Development

No branches or pull requests

1 participant