Skip to content

Unable to access information from attached database #315

@davidjbrennan

Description

@davidjbrennan

What happens?

After attaching duckdb to a postgres database, trying to access any information from the attached database produces the following error:
INTERNAL Error: Type not supported for GetCatalogSet

There is no problem if I'm using duckdb version 1.22

To Reproduce

v1.3.0-dev2709 84db85c090
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D ATTACH 'dbname=postgres user=postgres host=127.0.0.1' AS db (TYPE postgres);
D use db;
D from information_schema.tables;
INTERNAL Error:
Type not supported for GetCatalogSet

Stack Trace:

0        _ZN6duckdb9ExceptionC2ENS_13ExceptionTypeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 64
1        _ZN6duckdb17InternalExceptionC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 20
2        _ZN6duckdb19PostgresSchemaEntry13GetCatalogSetENS_11CatalogTypeE + 172
3        _ZN6duckdb19PostgresSchemaEntry11LookupEntryENS_18CatalogTransactionERKNS_15EntryLookupInfoE + 76
4        _ZN6duckdb18SchemaCatalogEntry8GetEntryENS_18CatalogTransactionENS_11CatalogTypeERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE + 84
5        _ZN6duckdb13PostgresUtils17TypeToLogicalTypeENS_12optional_ptrINS_19PostgresTransactionELb1EEENS1_INS_19PostgresSchemaEntryELb1EEERKNS_16PostgresTypeDataERNS_12PostgresTypeE + 2876
6        _ZN6duckdb16PostgresTableSet9AddColumnENS_12optional_ptrINS_19PostgresTransactionELb1EEENS1_INS_19PostgresSchemaEntryELb1EEERNS_14PostgresResultEyRNS_17PostgresTableInfoE + 408
7        _ZN6duckdb16PostgresTableSet13CreateEntriesERNS_19PostgresTransactionERNS_14PostgresResultEyy + 628
8        _ZN6duckdb16PostgresTableSet11LoadEntriesERNS_13ClientContextE + 120
9        _ZN6duckdb18PostgresCatalogSet4ScanERNS_13ClientContextERKNSt3__18functionIFvRNS_12CatalogEntryEEEE + 108
10       duckdb::DuckDBTablesInit(duckdb::ClientContext&, duckdb::TableFunctionInitInput&) + 208
11       duckdb::TableScanGlobalSourceState::TableScanGlobalSourceState(duckdb::ClientContext&, duckdb::PhysicalTableScan const&) + 424
12       duckdb::PhysicalTableScan::GetGlobalSourceState(duckdb::ClientContext&) const + 52
13       duckdb::PipelineEvent::Schedule() + 444
14       duckdb::Event::Finish() + 160
15       duckdb::PipelineInitializeTask::ExecuteTask(duckdb::TaskExecutionMode) + 68
16       duckdb::ExecutorTask::Execute(duckdb::TaskExecutionMode) + 288
17       duckdb::Executor::ExecuteTask(bool) + 544
18       duckdb::ClientContext::ExecuteTaskInternal(duckdb::ClientContextLock&, duckdb::BaseQueryResult&, bool) + 64
19       duckdb::PendingQueryResult::ExecuteInternal(duckdb::ClientContextLock&) + 120
20       duckdb::PendingQueryResult::Execute() + 56
21       duckdb_shell_sqlite3_print_duckbox + 520
22       duckdb_shell::ShellState::ExecutePreparedStatement(sqlite3_stmt*) + 588
23       duckdb_shell::ShellState::ExecuteSQL(char const*, char**) + 496
24       duckdb_shell::ShellState::RunOneSqlLine(char*) + 248
25       duckdb_shell::ShellState::ProcessInput() + 1148
26       main + 3560
27       start + 6000

This error signals an assertion failure within DuckDB. This usually occurs due to unexpected conditions or errors in the program's logic.
For more information, see https://duckdb.org/docs/stable/dev/internal_errors

OS:

macOS Sequoia 15.4.1

PostgreSQL Version:

17.4 (postgres.app)

DuckDB Version:

v1.3.0-dev2709

DuckDB Client:

CLI

Full Name:

David Brennan

Affiliation:

None

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