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

DuckDB crashes when doing query on schema named "main" in Postgres. #272

Open
2 tasks done
Bigknoob opened this issue Nov 29, 2024 · 0 comments · May be fixed by #290
Open
2 tasks done

DuckDB crashes when doing query on schema named "main" in Postgres. #272

Bigknoob opened this issue Nov 29, 2024 · 0 comments · May be fixed by #290

Comments

@Bigknoob
Copy link

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?

  • 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
Mytherin added a commit to Mytherin/duckdb-postgres that referenced this issue Jan 28, 2025
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

Successfully merging a pull request may close this issue.

1 participant