Skip to content

Commit

Permalink
Rename PostgresScanTableFunction
Browse files Browse the repository at this point in the history
Because this can conflict with DuckDB's `postgres` extension which check scanner by name eg. https://github.com/duckdb/duckdb-postgres/blob/8461ed8b6f726564934e9c831cdc88d431e3148f/src/storage/postgres_insert.cpp#L193-L195
  • Loading branch information
Y-- committed Feb 14, 2025
1 parent 3789e4c commit ec36932
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/scan/postgres_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ PostgresScanFunctionData::~PostgresScanFunctionData() {
//

PostgresScanTableFunction::PostgresScanTableFunction()
: TableFunction("postgres_scan", {}, PostgresScanFunction, nullptr, PostgresScanInitGlobal, PostgresScanInitLocal) {
: TableFunction("pgduckdb_postgres_scan", {}, PostgresScanFunction, nullptr, PostgresScanInitGlobal,
PostgresScanInitLocal) {
named_parameters["cardinality"] = duckdb::LogicalType::UBIGINT;
named_parameters["relid"] = duckdb::LogicalType::UINTEGER;
named_parameters["snapshot"] = duckdb::LogicalType::POINTER;
Expand Down
4 changes: 2 additions & 2 deletions test/regression/expected/duckdb_recycle.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ EXPLAIN SELECT count(*) FROM ta;
│ count_star() │
└─────────────┬─────────────┘
┌─────────────┴─────────────┐
POSTGRES_SCAN
PGDUCKDB_POSTGRES_SCAN
│ ──────────────────── │
│ Table: ta │
│ │
Expand All @@ -37,7 +37,7 @@ EXPLAIN SELECT count(*) FROM ta;
│ count_star() │
└─────────────┬─────────────┘
┌─────────────┴─────────────┐
POSTGRES_SCAN
PGDUCKDB_POSTGRES_SCAN
│ ──────────────────── │
│ Table: ta │
│ │
Expand Down

0 comments on commit ec36932

Please sign in to comment.