query for "show standard_conforming_strings"; as this variable was
added as of PG 8.2, we skip the query for PG versions older than
that as well as for backends like Redshift. #2946
.. changelog::
:version: 0.9.3
+ .. change::
+ :tags: bug, postgresql
+ :tickets: 2946
+
+ Added server version detection to the newly added dialect startup
+ query for "show standard_conforming_strings"; as this variable was
+ added as of PG 8.2, we skip the query for PG versions older than
+ that as well as for backends like Redshift.
+
.. change::
:tags: bug, orm, declarative
:tickets: 2950
# http://www.postgresql.org/docs/9.3/static/release-9-2.html#AEN116689
self.supports_smallserial = self.server_version_info >= (9, 2)
- self._backslash_escapes = connection.scalar(
+ self._backslash_escapes = self.server_version_info < (8, 2) or \
+ connection.scalar(
"show standard_conforming_strings"
) == 'off'