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

Remove most C++ from pgduckdb.cpp #498

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Remove most C++ from pgduckdb.cpp #498

wants to merge 1 commit into from

Conversation

Y--
Copy link
Collaborator

@Y-- Y-- commented Dec 16, 2024

  • bring all initialization methods declarations in the pgduckdb.h files
  • remove most C++ includes from pgduckdb.cpp (last remaining is type_traits for the GUC helpers)

@Y-- Y-- requested a review from JelteF December 16, 2024 14:39
// pgduckdb_background_worker.cpp
void DuckdbInitBackgroundWorker();

namespace pgduckdb {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this starts containing namespace sections than the header should probably be renamed into a hpp file.

static void
DuckdbInitGUC(void) {
void
DuckdbInitGUC() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related thought: I've been thinking we should probably move this GUC stuff to its own guc.cpp file.

Comment on lines +13 to +22
void DuckdbInitGUC();

// pgduckdb_hooks.cpp
void DuckdbInitHooks();

// pgduckdb_node.cpp
void DuckdbInitNode();

// pgduckdb_background_worker.cpp
void DuckdbInitBackgroundWorker();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why move these functions to this header instead of leaving them defined where they were?

@JelteF JelteF added this to the 0.4.0 milestone 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 this pull request may close these issues.

2 participants