Skip to content

Commit b60890f

Browse files
authored
Undo required changes for a PG18 commit that got reverted (#855)
This makes pg_duckdb compile with the latest PG18 commit.
1 parent 213a3d7 commit b60890f

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,9 @@ jobs:
5252
type: ReleaseStatic
5353
- version: REL_17_STABLE
5454
type: Debug
55-
- version: REL_18_BETA1
55+
- version: REL_18_STABLE
5656
type: Release
5757

58-
# Not enabled for now (waiting for April 2025 code freeze)
59-
# - version: master
60-
# type: Release
61-
6258
runs-on: ubuntu-24.04
6359

6460
steps:

src/pgduckdb_hooks.cpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -331,31 +331,18 @@ DuckdbExecutorStartHook_Cpp(QueryDesc *queryDesc) {
331331
pgduckdb::ClaimCurrentCommandId();
332332
}
333333

334-
#if PG_VERSION_NUM >= 180000
335-
static bool
336-
#else
337334
static void
338-
#endif
339335
DuckdbExecutorStartHook(QueryDesc *queryDesc, int eflags) {
340336
pgduckdb::executor_nest_level++;
341337
if (!pgduckdb::IsExtensionRegistered()) {
342338
pgduckdb::MarkStatementNotTopLevel();
343-
return prev_executor_start_hook(queryDesc, eflags);
339+
prev_executor_start_hook(queryDesc, eflags);
340+
return;
344341
}
345342

346-
#if PG_VERSION_NUM >= 180000
347-
if (!prev_executor_start_hook(queryDesc, eflags)) {
348-
return false;
349-
}
350-
#else
351343
prev_executor_start_hook(queryDesc, eflags);
352-
#endif
353344

354345
InvokeCPPFunc(DuckdbExecutorStartHook_Cpp, queryDesc);
355-
356-
#if PG_VERSION_NUM >= 180000
357-
return true;
358-
#endif
359346
}
360347

361348
/*

src/scan/postgres_table_reader.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,8 @@ PostgresTableReader::InitUnsafe(const char *table_scan_query, bool count_tuples_
6565

6666
PlannedStmt *planned_stmt = standard_planner(query, table_scan_query, 0, nullptr);
6767

68-
#if PG_VERSION_NUM >= 180000
69-
table_scan_query_desc = CreateQueryDesc(planned_stmt, nullptr, table_scan_query, GetActiveSnapshot(),
70-
InvalidSnapshot, None_Receiver, nullptr, nullptr, 0);
71-
#else
7268
table_scan_query_desc = CreateQueryDesc(planned_stmt, table_scan_query, GetActiveSnapshot(), InvalidSnapshot,
7369
None_Receiver, nullptr, nullptr, 0);
74-
#endif
7570

7671
ExecutorStart(table_scan_query_desc, 0);
7772

0 commit comments

Comments
 (0)