Update Postgres Plugin for dbt-duckdb to Use ATTACH Syntax and Improve Compatibility Gexar/update pgsql plugin #478 #480
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.
Description:
This pull request updates the
Postgres
plugin for thedbt-duckdb
adapter to align with the latest DuckDB PostgreSQL extension (ATTACH
syntax) and introduces improvements to functionality, testing, and error handling.Changes Made:
Migration to
ATTACH
Syntax:CALL postgres_attach
syntax with the newATTACH
command, returning the write-to-pg functionality.overwrite
in favor ofREAD_ONLY
.Enhanced Configuration:
Improved Logging and Debugging:
AdapterLogger
to provide clearer and more detailed error messages.Updated Unit Tests:
ATTACH
with default and custom configurations.Code Refactoring:
_set_extension_settings
,_build_attach_statement
).Testing:
1.1.3
.Impact:
Checklist:
postgres.py
to supportATTACH
syntax.test_postgres.py
to reflect new features and configurations.Related Issues:
Unfortunately, due to this issue the testing has to be done outside the VSCode dev container.
#478
closed previous PR due to a bad structuring of unit tests.
Please review the changes and let me know if additional updates or refinements are needed. Thank you for your time and consideration!🚀