diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-01-31 19:04:54 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-01-31 19:04:54 -0500 |
commit | bf70f556b382dc376783efbcb598e0fab71ee235 (patch) | |
tree | b2eb21efee6bf90b693b4703e4a3890e9dcfb912 /test/requirements.py | |
parent | a523163c4140e5a912540a0092206b99ddf9796d (diff) | |
download | sqlalchemy-bf70f556b382dc376783efbcb598e0fab71ee235.tar.gz |
- Added support for the :class:`postgresql.JSONB` datatype when
using psycopg2 2.5.4 or greater, which features native conversion
of JSONB data so that SQLAlchemy's converters must be disabled;
additionally, the newly added psycopg2 extension
``extras.register_default_jsonb`` is used to establish a JSON
deserializer passed to the dialect via the ``json_deserializer``
argument. Also repaired the Postgresql integration tests which
weren't actually round-tripping the JSONB type as opposed to the
JSON type. Pull request courtesy Mateusz Susik.
- Repaired the use of the "array_oid" flag when registering the
HSTORE type with older psycopg2 versions < 2.4.3, which does not
support this flag, as well as use of the native json serializer
hook "register_default_json" with user-defined ``json_deserializer``
on psycopg2 versions < 2.5, which does not include native json.
Diffstat (limited to 'test/requirements.py')
-rw-r--r-- | test/requirements.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/requirements.py b/test/requirements.py index 89fc108b9..4d5869226 100644 --- a/test/requirements.py +++ b/test/requirements.py @@ -816,3 +816,9 @@ class DefaultRequirements(SuiteRequirements): return against(config, 'mysql') and \ config.db.dialect._detect_casing(config.db) == 0 + @property + def postgresql_utf8_server_encoding(self): + return only_if( + lambda config: against(config, 'postgresql') and + config.db.scalar("show server_encoding").lower() == "utf8" + ) |