Skip to content

fix: correctly urlencode parameters in the PostgreSQL connection string (URI)#92

Open
jcshepherd wants to merge 5 commits into
ExtendDB:mainfrom
jcshepherd:issue-52
Open

fix: correctly urlencode parameters in the PostgreSQL connection string (URI)#92
jcshepherd wants to merge 5 commits into
ExtendDB:mainfrom
jcshepherd:issue-52

Conversation

@jcshepherd
Copy link
Copy Markdown
Collaborator

What

PostgreSQL connection strings are URIs: components like host name, user name, password, etc., should be urlencoded. This indirectly addresses #52 (connecting to pg over unix socket.

Why

#52 - Enable extenddb init to correctly configure extenddb to connect to pg via unix socket.

Closes #52

Testing done

Unit tests, pytests over socket connection, manual test.

Automated testing is tricky because a new pg instance needs to be started when changing from unix to network socket connections.

Checklist

  • [Y] I have read CONTRIBUTING.md
  • [Y] All tests pass (cargo test --workspace)
  • [Y] Code is formatted (cargo fmt --check)
  • [Y] Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • [Y] I have added or updated tests for new functionality
  • [Y] I have updated documentation if behavior changed
  • [N/A] Breaking changes are noted below (if any)

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

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.

Init-generated connection string fails at daemon startup with "empty host" when --pg-host is a Unix socket path

1 participant