Open maruth-stripe opened 9 months ago
Why would you expect to have constraints? Constraints are for writing, and this is a "scanner" extension.
Thanks for the report! It is indeed not expected that DESCRIBE
shows the column constraints when using sqlite_attach
, as that creates only a set of views (which do not have constraints).
It is however expected that ATTACH
shows the column constraints - and it appears that that is not working correctly currently either. This appears to be a problem with how the upstream duckdb_constraints
function handles constraints in custom tables and not a problem specifically with this extension, however.
What happens?
For a simple table generated with SQLite
On loading with DuckDB the
PRIMARY KEY
constraint on thefoo
column is not pulled inTo Reproduce
To generate the SQLite table
To load in DuckDB
OS:
macOS
SQLite Version:
3.39.5
DuckDB Version:
v0.8.1
DuckDB Client:
CLI
Full Name:
Maruth Goyal
Affiliation:
Stripe
Have you tried this on the latest
master
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?