]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- The psycopg2 dialect now uses psycopg2's "unicode extension"
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Oct 2009 00:32:39 +0000 (00:32 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Oct 2009 00:32:39 +0000 (00:32 +0000)
commit5119ce78b5c47f89a9dfca2a2781cec60551a0e7
tree57d266f7e3445be001bc6264223d2e73f256520a
parenteb9763febe58655ca0f61fa758925c56b94ece9b
- 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.
16 files changed:
CHANGES
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/strategies.py
lib/sqlalchemy/test/engines.py
lib/sqlalchemy/types.py
test/aaa_profiling/test_resultset.py
test/aaa_profiling/test_zoomark.py
test/aaa_profiling/test_zoomark_orm.py
test/dialect/test_oracle.py
test/dialect/test_postgresql.py
test/engine/test_pool.py
test/orm/test_query.py
test/sql/test_types.py