diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-04 15:49:01 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-04 15:49:01 -0400 |
| commit | 6a7ef343618097916f3e2d8680cafe50c16a28c1 (patch) | |
| tree | dacb0e4180122e4a3afe5d971c57ebf4691de5f5 /lib/sqlalchemy | |
| parent | dfb5707dae454448ab3e34e9c4ffda13419ca76b (diff) | |
| download | sqlalchemy-6a7ef343618097916f3e2d8680cafe50c16a28c1.tar.gz | |
- clarify that the pg8000 backend has no impact of any kind on
the pg8000 DBAPI's encoding behavior, fixes #3112.
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/pg8000.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/pg8000.py b/lib/sqlalchemy/dialects/postgresql/pg8000.py index 8ed7c9423..dc5ed6e73 100644 --- a/lib/sqlalchemy/dialects/postgresql/pg8000.py +++ b/lib/sqlalchemy/dialects/postgresql/pg8000.py @@ -16,14 +16,15 @@ postgresql+pg8000://user:password@host:port/dbname[?key=value&key=value...] Unicode ------- -When communicating with the server, pg8000 uses the character set that the -server asks it to use (the client encoding). By default the client encoding is -the database's character set (chosen when the database is created), but the -client encoding can be changed in a number of ways (eg. setting CLIENT_ENCODING -in postgresql.conf). - -Set the "encoding" parameter on create_engine(), to the same as the client -encoding, usually "utf-8". +When communicating with the server, pg8000 **always uses the server-side +character set**. SQLAlchemy has no ability to modify what character set +pg8000 chooses to use, and additionally SQLAlchemy does no unicode conversion +of any kind with the pg8000 backend. The origin of the client encoding setting +is ultimately the CLIENT_ENCODING setting in postgresql.conf. + +It is not necessary, though is also harmless, to pass the "encoding" parameter +to :func:`.create_engine` when using pg8000. + .. _pg8000_isolation_level: |
