Simple connection to duckdb with postgres fails. Unsupported Postgres type ltree
Closed this issue · 2 comments
jerryheir commented
Simple connection to duckdb with postgres fails
conn = duckdb.connect(database=':memory:')
conn.execute(f"""
INSTALL postgres;
LOAD postgres;
CALL postgres_attach('host={db_host} dbname={db_name} user={db_user} password={db_pwd}');
""")OR
conn.execute(f"""
INSTALL postgres_scanner;
LOAD postgres_scanner;
select * from postgres_scan('host={db_host} dbname={db_name} user={db_user} password={db_pwd}', 'public', 'product');
""")
This throws an error duckdb.Error: Invalid Error: IO Error: Unsupported Postgres type ltree
Seems like there is something I am not doing right.
DuckDB - v0.6.1
Python - v3.9
hannes commented
The ltree type comes from a label tree (?) postgres module which is a bit obscure and unlikely to be supported soon.
jerryheir commented
It's used when storing data in a hierarchical tree like structure. Making it more easy to query data easily on any level of the tree.
🥹 I am optimistic the support for ltree will come soon