Conversation
Add a C-exported function that returns a void* pointer to the DuckDB database instance managed by pg_duckdb. This allows external PostgreSQL extensions (e.g. pg_ducklake_next) to access the DuckDB instance for loading statically-linked DuckDB extensions via LoadStaticExtension<T>(). Follows the same pattern as RegisterDuckdbTableAm in pgduckdb_table_am.cpp. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
External extensions (e.g. pg_ducklake) need to call LoadStaticExtension() but cannot do so during _PG_init() because the DuckDB instance is not yet initialized. This adds a callback registration API so external extensions can register a loader that pg_duckdb invokes during DuckDBManager::Initialize(), after the instance is fully configured. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add extern "C" with default visibility to these two functions so pg_ducklake can resolve them at runtime for CTAS support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add pg_ducklake's extension OID check to BuildDuckdbOnlyFunctions() so functions registered by pg_ducklake (e.g. ducklake.options()) are recognized as DuckDB-only functions and routed correctly. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Set DDLType::ALTER_TABLE for tables using registered external AMs (e.g. ducklake) in utility hook, not just native duckdb tables - Export DuckdbIsAlterTableInProgress() for external extensions - Export pgduckdb_get_alter_tabledef() and pgduckdb_get_rename_relationdef() with extern "C" visibility for use by external extensions - Fix pgduckdb_get_rename_relationdef() to use actual table AM name instead of hardcoded "duckdb" Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Exports DuckdbAllowSubtransaction(bool) so that extensions like pg_ducklake can temporarily suppress the SAVEPOINT check in the subxact callback while starting an internal PostgreSQL subtransaction as part of a DuckDB-coordinated metadata commit. Declared in pgduckdb_contracts.h for use by downstream extensions.
Wraps DuckDBManager::IsInitialized() as an extern "C" visible symbol so downstream extensions can check whether DuckDB has been initialized in the current backend without triggering lazy initialization. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add DuckdbLockGlobalProcess/DuckdbUnlockGlobalProcess exports so pg_ducklake can acquire the lock across DSO boundaries without depending on the C++ header. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…views Add "time_travel" to DuckDB-only function list. Expand duckdb.row columns to proper PostgreSQL types in CREATE VIEW for queries requiring DuckDB execution, so pg_attribute shows real column names and types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Register external table check and relation name callbacks so downstream extensions can route foreign tables through DuckDB - Export GetPostgresDuckDBType/Typemod with default visibility for column inference in pg_ducklake's FDW Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.