Skip to content
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

Support single-quotes for parsing connection strings #1212

Closed
wants to merge 4 commits into from

Conversation

Krzmbrzl
Copy link
Contributor

@Krzmbrzl Krzmbrzl commented Mar 4, 2025

Fixes #1210

@Krzmbrzl
Copy link
Contributor Author

Krzmbrzl commented Mar 4, 2025

I am currently assuming that it is enough for the parsing to properly understand that single quotes are also quotes and that other parts of the code don't implicitly rely on the parsed connection string using a specific kind of quotes.

The accessor functions for the original connection string make me a bit nervous in that regard... but I guess CI will tell us whether this change broke something or not 👀

Copy link
Member

@vadz vadz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I'll (squash) merge it soon.

os << "Expected ";
if (quote == '\'')
{
os << "'";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to show it differently I'd do this for symmetry:

Suggested change
os << "'";
os << R"("'")";

but I think we could also just use the else version in all cases.

@vadz
Copy link
Member

vadz commented Mar 4, 2025

Merged as caaf562 with minor changes to make this a bit more symmetrical between single and double quotes, thanks!

Will also push to 4.1 branch soon.

@vadz vadz closed this Mar 4, 2025
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.

PostgreSQL connection parameter parsing regression
2 participants