From 29ef0ad7c12d9ac8c27123d945bc4fbd74ba1a3c Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Tue, 9 Feb 2016 15:20:51 +0100 Subject: Make all tests pass with postgresql+pygresql Note that it requires the latest PyGreSQL 5.0 to pass all tests, a warning is printed otherwise. Minor change to test.dialect.postgresql.test_types: - JSON content should not be required to be unicode if the dialect doesn't return unicode (Python 2). Minor change to dialects/postgresql.base: - Return index names properly casted to unicode --- lib/sqlalchemy/dialects/postgresql/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/postgresql/base.py') diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index b16a82e04..25938d44b 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -2396,7 +2396,9 @@ class PGDialect(default.DefaultDialect): i.relname """ - t = sql.text(IDX_SQL, typemap={'attname': sqltypes.Unicode}) + t = sql.text(IDX_SQL, typemap={ + 'relname': sqltypes.Unicode, + 'attname': sqltypes.Unicode}) c = connection.execute(t, table_oid=table_oid) indexes = defaultdict(lambda: defaultdict(dict)) -- cgit v1.2.1