# https://www.postgresql.org/docs/9.3/static/release-9-2.html#AEN116689
self.supports_smallserial = self.server_version_info >= (9, 2)
- std_string = connection.exec_driver_sql(
- "show standard_conforming_strings"
- ).scalar()
- self._backslash_escapes = std_string == "off"
+ self.set_backslash_escapes()
self._supports_drop_index_concurrently = self.server_version_info >= (
9,
)
self.supports_identity_columns = self.server_version_info >= (10,)
+ def set_backslash_escapes(self):
+ # this method is provided as an override hook for descendant
+ # dialects (e.g. Redshift), so removing it may break them
+ std_string = connection.exec_driver_sql(
+ "show standard_conforming_strings"
+ ).scalar()
+ self._backslash_escapes = std_string == "off"
+
def get_isolation_level_values(self, dbapi_conn):
# note the generic dialect doesn't have AUTOCOMMIT, however
# all postgresql dialects should include AUTOCOMMIT.