Skip to content

fix: decode + as space in options startup parameter#976

Merged
levkk merged 1 commit into
pgdogdev:mainfrom
matteosilv:fix/options-plus-encoding
May 13, 2026
Merged

fix: decode + as space in options startup parameter#976
levkk merged 1 commit into
pgdogdev:mainfrom
matteosilv:fix/options-plus-encoding

Conversation

@matteosilv
Copy link
Copy Markdown
Contributor

URL form-encoding uses + for spaces, but libpq only decodes %xx percent-encoding (RFC 3986), leaving + literal in the startup message. This caused pgdog.role and other options to be silently ignored when the connection URL used + instead of %20.

We hit this problem while configuring airflow connections (Google Cloud Composer managed) through their extra (JSON) field.

URL form-encoding uses + for spaces, but libpq only decodes %xx
percent-encoding (RFC 3986), leaving + literal in the startup message.
This caused pgdog.role and other options to be silently ignored when
the connection URL used + instead of %20.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 13, 2026

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 94.73684% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pgdog/src/net/messages/hello.rs 94.73% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@levkk levkk merged commit 36394ad into pgdogdev:main May 13, 2026
21 of 22 checks passed
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.

3 participants