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

Allow TEXT columns in keys (without prefix length) #797

Open
fulghum opened this issue Oct 2, 2024 · 0 comments
Open

Allow TEXT columns in keys (without prefix length) #797

fulghum opened this issue Oct 2, 2024 · 0 comments

Comments

@fulghum
Copy link
Contributor

fulghum commented Oct 2, 2024

PostgreSQL allows TEXT columns to be used in keys (without having to specify a prefix length), but Doltgres does not.

PostgreSQL:

CREATE TABLE users (
    username text NOT NULL PRIMARY KEY,
    karma numeric NOT NULL
);
CREATE TABLE

 
Doltgres:

CREATE TABLE users (
    username text NOT NULL PRIMARY KEY,
    karma numeric NOT NULL
);
ERROR:  blob/text column 'username' used in key specification without a key length (errno 1105) (sqlstate HY000)

Discovered while testing multiple data dumps, including: Hasura, usda-r18, iso-3166

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

No branches or pull requests

1 participant