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

Unique BLOB not supported? #105

Closed
NorbertHauriel opened this issue Jul 23, 2023 · 1 comment
Closed

Unique BLOB not supported? #105

NorbertHauriel opened this issue Jul 23, 2023 · 1 comment

Comments

@NorbertHauriel
Copy link

NorbertHauriel commented Jul 23, 2023

In v1.4.1, I get this error:

Not implemented Error: Indexes cannot contain BLOBs that contain null-terminated bytes.
when trying to insert a random blob (containing one or more zero bytes) into a UNIQUE blob column into this table schema:

CREATE SEQUENCE IF NOT EXISTS seq_hashes START 1;
CREATE TABLE IF NOT EXISTS "Hashes" (
    "id" bigint PRIMARY KEY DEFAULT nextval('seq_hashes'),
    "hash" bytea NOT NULL UNIQUE
);
  • Removing the UNIQUE keyword lets me insert the rows. Checked it to see if the error message is legit and it is.
  • The concept of null-termination doesn't make any sense for BLOBs, so the error message is misleading, wrongly suggesting that I intend to misuse the BLOB datatype, but I want to use it for the exact reason it is made for, to represent raw bytes of any size.
  • My natural assumption was that unimplemented SQL statemements must fail early, that is, the above table creation should not be allowed to execute, meaning that I would like to see "Not implemented Error" thrown upon table creation immediately.

Is it possible to have a clear roadmap TODO list of the missing features from basic commands like UNIQUE, PRIMARY KEY, REFERENCES, and postgres datatypes not being supported fully in some operations?

Thanks for having this cool project, thrilled to see it develop to the maturity level of sqlite3!

@marcboeker
Copy link
Owner

Hi, I think this is an issue for the DuckDB Project as go-duckdb only links against the DuckDB C API and provides a Go driver. We have no influence over features that affect DuckDB.

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

No branches or pull requests

2 participants