Repository navigation
Skip standard_conforming_strings=off specs on PostgreSQL-19 - #755
Merged
Merged
Conversation
PostgreSQL-19 forces standard_conforming_strings to always be on and
removes escape_string_warning, so the embed_params specs that switch
these settings fail:
SET standard_conforming_strings = off
ERROR: non-standard string literals are not supported
SET escape_string_warning = off
ERROR: unrecognized configuration parameter "escape_string_warning"
Skip the "off" variants on PostgreSQL-19 and run the "on" variants
without changing the settings.
https://www.postgresql.org/docs/19/release-19.html#RELEASE-19-MIGRATION
postgres/postgres@4576208
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Thank you very much! I already noticed this change, but didn't take an action so far. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
PostgreSQL-19 forces
standard_conforming_stringsto always be on and removesescape_string_warning.Running the specs against a PostgreSQL-19 server, the
embed_paramsspecs fail becausewith_std_conf_stringsswitches these settings:The "on" variants fail too, since they also
SET escape_string_warning = on.Changes
with_std_conf_stringschecksconn.server_version. On PostgreSQL-19 and later it skips the "off" variants and runs the "on" variants without changing any settings. Older servers keep the current behavior.How this was tested
CI does not run against PostgreSQL-19 yet. I tested this with PostgreSQL 19rc1 by adding it to the
source-gem.ymlmatrix (not included in this pull request):All jobs passed, and the PostgreSQL-19 job reports 1159 examples, 0 failures, with the 4 "off" variants pending: https://github.com/yahonda/ruby-pg/actions/runs/39204891098