Skip to content

Add pg connection options creation without environment #3832

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 1 commit into
base: main
Choose a base branch
from

Conversation

mbj
Copy link
Contributor

@mbj mbj commented Apr 19, 2025

Is this a breaking change?

no.

Rationale:

I make SQL tools that need to behave correctly in situations the environment cannot be relied upon (developer boxes, my code is run as a 3rd party library etc) and where my SQL connections need to be precisely controlled by my own code.

Before my only option was to use new_without_pgpass and explicitly unset any field that may have been picked up by that function in my own code. But this is breaky as sqlx-postgresql may accumulate new fields in new releases. Also not all fields have APIs to unset the effect of env reflection.

@mbj mbj force-pushed the add/no-defaults-pg-options branch from b0b07d3 to f8ad9a0 Compare April 19, 2025 23:42
@mbj mbj force-pushed the add/no-defaults-pg-options branch from f8ad9a0 to 1c2b3a3 Compare April 20, 2025 00:10
@mbj mbj force-pushed the add/no-defaults-pg-options branch from 1c2b3a3 to a836e18 Compare April 20, 2025 01:37
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