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

Connection string with search_path doesn't work anymore #1187

Open
cstiborg opened this issue Dec 23, 2024 · 3 comments
Open

Connection string with search_path doesn't work anymore #1187

cstiborg opened this issue Dec 23, 2024 · 3 comments

Comments

@cstiborg
Copy link
Contributor

I used to have a very nice connection string against postgresql with "options='--search_path=my_path'" next to the normal user, host, etc. Such that I could use different paths from different areas of my application.

I have an "old" fork in which it works and from a diff I realize that there's been a lot of code committed on November 9th to harmonize code for connection strings between different DBs.
I have been reviewing the code briefly but I didn't find a smoking gun.

This issue is to raise awareness of the lack of backwards compatibility, and of course to talk whether this was just a side-effect and I should solve this differently. (I hope not, because in my last commit for postgresql I spent quite some time assuring this would keep working. - But I'll accept if I'm the only one)

@vadz
Copy link
Member

vadz commented Dec 23, 2024

Sorry, this wasn't intentional. I am not sure why exactly did this break, we're still supposed to pass all the options, including the ones SOCI doesn't know about (such as options) to libpq. I'll try to debug this if you don't beat me to it.

@cstiborg
Copy link
Contributor Author

My fork has changes from the 22nd of October up until now. It could be anything between now and then... Statistically it should be closer to December, because I've done a lot of work on my project, and I rebuild SOCI often as part of the process. And I didn't realize until a couple of weeks ago. I thought it was a bug on my side - so I parked it until today...

@vadz
Copy link
Member

vadz commented Dec 23, 2024

This is surely related to my changes in #1176, the question is why exactly is it broken, e.g. what does build_string_from_options() return for this string in postgresql_session_backend::connect().

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

No branches or pull requests

2 participants