Skip to content

Psycopg2SqlClient: accept extra options #2755

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

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

nicob3y
Copy link

@nicob3y nicob3y commented Jun 12, 2025

see #2656

Description

Add ability to add Postgres runtime server config via Psycopg2SqlClient.

Example of PostgresCredentials usage with "my_setting" server setting :

from dlt.destinations.impl.postgres.configuration import PostgresCredentials

creds = PostgresCredentials("postgresql://user:password@host:port/db?options=-cmy_setting=value")

Additional Context

I needed to transmit a parameter (such as a session option) to the PostgreSQL server, but the current implementation of Psycopg2SqlClient did not allow me to do this easily.

Copy link

netlify bot commented Jun 12, 2025

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit b8b0c81
🔍 Latest deploy log https://app.netlify.com/projects/dlt-hub-docs/deploys/684b4922dcf6700008cfb626
😎 Deploy Preview https://deploy-preview-2755--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nicob3y
Copy link
Author

nicob3y commented Jun 12, 2025

As it is, the "search_path" setting cannot be customized; do you think this could be useful?

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.

1 participant