-
Notifications
You must be signed in to change notification settings - Fork 571
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
ido pgsql sets standard_conforming_strings to off without using it #8122
Comments
Hello @MEschenbacher and thank you for reporting! Is there a problem for you as Icinga user due to that setting? Best, |
I was not sure about labelling the issue as either bug or feature. Maybe that is what you are hinting. On the one hand it has no impact at all if the code stays or leaves since the behavour, which the I noticed the issue originally when trying to use cockroachdb as database backend for icinga2 but figured I can argue this without basing the discussion on a specific technology by just looking at the code. |
How did you notice it? Did cockroachdb not work/complain? |
Sorry for acting so vague: Yes, cockroachdb did complain with a hard error. The setting |
Before postgres 9.1, this setting defaulted to off and icinga2 code was making heavy use of this feature. Since postgres 9.1, this settings defaults to on. During the adoption of postgres >= 9.1, the icinga2 postgres ido code maintained compatibility by setting it to off explicitly. In the mean time, the postgres ido code has been converted to using the `E'...'` escape literal syntax exclusively. The last remaining step is now to no longer force the setting to off because no query is using the feature any longer. Closes github issue Icinga#8122.
Before postgres 9.1, this setting defaulted to off and icinga2 code was making heavy use of this feature. Since postgres 9.1, this settings defaults to on. During the adoption of postgres >= 9.1, the icinga2 postgres ido code maintained compatibility by setting it to off explicitly. In the mean time, the postgres ido code has been converted to using the `E'...'` escape literal syntax exclusively. The last remaining step is now to no longer force the setting to off because no query is using the feature any longer. Closes github issue Icinga#8122.
Before postgres 9.1, this setting defaulted to off and icinga2 code was making heavy use of this feature. Since postgres 9.1, this settings defaults to on. During the adoption of postgres >= 9.1, the icinga2 postgres ido code maintained compatibility by setting it to off explicitly. In the mean time, the postgres ido code has been converted to using the `E'...'` escape literal syntax exclusively. The last remaining step is now to no longer force the setting to off because no query is using the feature any longer. Closes github issue Icinga#8122.
Describe the bug
https://github.com/Icinga/icinga2/blob/master/lib/db_ido_pgsql/idopgsqlconnection.cpp#L260 sets
standard_conforming_strings TO off
although it is not leveraging the functionality this setting provides (https://www.postgresql.org/docs/current/runtime-config-compatible.html). All query strings for which escaping is explicitly enabled are written asE='" + Escape(value) + "'"
.Since postgres 9.1, the setting defaults to true and we could omit the call.
The text was updated successfully, but these errors were encountered: