From 5119ce78b5c47f89a9dfca2a2781cec60551a0e7 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 26 Oct 2009 00:32:39 +0000 Subject: - The psycopg2 dialect now uses psycopg2's "unicode extension" on all new connections, which allows all String/Text/etc. types to skip the need to post-process bytestrings into unicode (an expensive step due to its volume). Other dialects which return unicode natively (pg8000, zxjdbc) also skip unicode post-processing. - String/Text/Unicode types now skip the unicode() check on each result column value if the dialect has detected the DBAPI as returning Python unicode objects natively. This check is issued on first connect using "SELECT CAST 'some text' AS VARCHAR(10)" or equivalent, then checking if the returned object is a Python unicode. This allows vast performance increases for native-unicode DBAPIs, including pysqlite/sqlite3, psycopg2, and pg8000. --- test/dialect/test_postgresql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/dialect/test_postgresql.py') diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index 626d54677..e4a5ffa55 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -1158,10 +1158,10 @@ class ArrayTest(TestBase, AssertsExecutionResults): arrtable = Table('arrtable', metadata, Column('id', Integer, primary_key=True), Column('intarr', postgresql.PGArray(Integer)), - Column('strarr', postgresql.PGArray(String(convert_unicode=True)), nullable=False) + Column('strarr', postgresql.PGArray(Unicode(assert_unicode=False)), nullable=False) ) metadata.create_all() - + def teardown(self): arrtable.delete().execute() -- cgit v1.2.1