postgres_scanner
postgres_scanner copied to clipboard
DuckDB crashes when doing query on schema named "main" in Postgres.
What happens?
When using DuckDB v1.1.3 with the Postgres extension (https://duckdb.org/docs/extensions/postgres.html), DuckDB crashes when querying a schema named "main."
I can successfully attach several databases and use the SHOW ALL TABLES; command to view all tables, including those under the schema named "main." However, attempting to execute a query such as SELECT * FROM alias.main.streets; causes DuckDB to crash. Seems like a schema name conflict?
To Reproduce
INSTALL postgres;
LOAD postgres;
ATTACH 'dbname=db_info user=beaver password=123 host=beavertown.postgresql-dev.com' as postgres_db_info (TYPE POSTGRES);
ATTACH 'dbname=db_main user=beaver password=123 host=beavertown.postgresql-dev.com' as postgres_db_main (TYPE POSTGRES);
SHOW ALL TABLES;
-- this shows all schemas and tables for both databases.
SELECT * FROM postgres_db_info.info.test;
-- this query works
SELECT * FROM postgres_db_main.main.test;
--duckdb crashes.
OS:
Windows
PostgreSQL Version:
16.3
DuckDB Version:
1.1.3
DuckDB Client:
Python
Full Name:
William Vagle
Affiliation:
Fraktal
Have you tried this on the latest main branch?
- [X] 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?
- [X] I agree