Skip to content

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

@Bigknoob

Description

@Bigknoob

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions