IO Error: Unsupported Postgres type tsvector
Closed this issue ยท 5 comments
What happens?
When I try either:
CALL postgres_attach('dbname=postgres');
or
SELECT * FROM postgres_scan('dbname=postgres', 'public', 'twitter_users');
on a Postgres database that uses tsvector, DuckDB fails with:
Error: Invalid Error: IO Error: Unsupported Postgres type tsvector
To Reproduce
Create a Postgres table with tsvector and run:
D INSTALL postgres_scanner;
D LOAD postgres_scanner;
D CALL postgres_attach('dbname=postgres');
in DuckDb.
Confirmed it reproduces on master of DuckDB and master branch of postgres_scanner (built from source):
duckdb-binaries-osx|โ ./duckdb -unsigned
v0.5.2-dev1318 b4f5e6ea46
Enter ".help" for usage hints.
D LOAD 'postgres_scanner/build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension';
D CALL postgres_attach('dbname=postgres');
Error: IO Error: Unsupported Postgres type tsvector
OS:
macOS 12.4
PostgreSQL Version:
psql (14.5 (Homebrew))
DuckDB Version:
v0.5.1 7c111322d
DuckDB Client:
CLI
Full Name:
Victor Mota
Affiliation:
PinchedIO
Have you tried this on the latest master branch?
- I agree
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- I agree
I had to look up what tsvector is, it seems to be related to full-text search https://www.postgresql.org/docs/current/datatype-textsearch.html
For me, it's not important to represent tsvector type in duckdb. I'd like the projection select id from postgres_scan(...) to ignore all tsvector columns. However, I still get this error when selecting only columns of supported data types (int, double, text, date, timestamp, etc) and the underlying table has a column with an unsupported type (such as tsvector).
That's my issue as well.. So far the only way to get around it is to drop the tsvector column (but that means breaking the current use case).
I think I will change the logic here so that those columns do no longer break the attach, they may just be not query-able
Thank you ! ๐ ๐