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

information_schema.table_constraints and key_column_usage always list "memory" for table_catalog on attached databases - CONSTRAINTS are not then well export #114

Open
Victordeleusse opened this issue Sep 5, 2024 · 0 comments

Comments

@Victordeleusse
Copy link

Victordeleusse commented Sep 5, 2024

Working on an attached sqlite database :

con = duckdb.connect()

con.execute("ATTACH 'california_schools.sqlite' as cs (TYPE sqlite)")

con.execute("USE cs")

res = con.execute("SELECT * FROM information_schema.table_constraints").fetchall()

print(res)

Here an error occured adding to use information_schema on "memory" :

CatalogException                          Traceback (most recent call last)

Cell In[187], line 1

----> 1 res = con.execute("SELECT * FROM information_schema.table_constraints").fetchall()

      2 print(res)

 

CatalogException: Catalog Error: Table with name table_constraints does not exist!

Did you mean "memory.information_schema.table_constraints"?

LINE 1: SELECT * FROM information_schema.table_constraints

When adding it and using it as requiered, the return list is empty whereas constraints keys well exist in database.

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

1 participant