diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-02-10 02:14:51 +0000 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-02-10 02:16:55 +0000 |
| commit | 713b86acdf6a51886ed68dd76fb6e698e3e9e55b (patch) | |
| tree | dd466a22102d0b80ccfcfca9dff75146c4d90453 /doc/src/faq.rst | |
| parent | 9c81f6c1868ef7f0c1cf05cf93c7c9d3b0643170 (diff) | |
| download | psycopg2-713b86acdf6a51886ed68dd76fb6e698e3e9e55b.tar.gz | |
Added FAQ point about bytea_output in PostgreSQL 9.0
Diffstat (limited to 'doc/src/faq.rst')
| -rw-r--r-- | doc/src/faq.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/faq.rst b/doc/src/faq.rst index c271b62..9172e35 100644 --- a/doc/src/faq.rst +++ b/doc/src/faq.rst @@ -94,6 +94,18 @@ Psycopg converts :sql:`decimal`\/\ :sql:`numeric` database types into Python `!D documentation. If you find `!psycopg2.extensions.DECIMAL` not avalable, use `!psycopg2._psycopg.DECIMAL` instead. +Transferring binary data from PostgreSQL 9.0 doesn't work. + PostgreSQL 9.0 uses by default `the "hex" format`__ to transfer + :sql:`bytea` data: the format can't be parsed by the libpq 8.4 and + earlier. Three options to solve the problem are: + + - set the bytea_output__ parameter to ``escape`` in the server; + - use ``SET bytea_output TO escape`` in the client before reading binary + data; + - upgrade the libpq library on the client to at least 9.0. + + .. __: http://www.postgresql.org/docs/9.0/static/datatype-binary.html + .. __: http://www.postgresql.org/docs/9.0/static/runtime-config-client.html#GUC-BYTEA-OUTPUT Best practices -------------- |
