Documentation about new support for binary objects improved

This commit is contained in:
Daniele Varrazzo 2011-02-16 02:54:30 +00:00
parent bccbcf42d0
commit 3b10ef8998
2 changed files with 12 additions and 4 deletions

5
NEWS
View File

@ -4,8 +4,9 @@ What's new in psycopg 2.4
* New features and changes:
- Added support for Python 3.1 and 3.2.
- Adapt types 'bytearray' (from Python 2.6) and 'memoryview' (from Python
2.7) to bytea data type.
- Adapt types 'bytearray' (from Python 2.6), 'memoryview' (from Python 2.7)
and other objects implementing the 'Revised Buffer Protocol' to bytea data
type.
- Added `register_composite()` function to cast PostgreSQL composite types
into Python tuples/namedtuples.
- More efficient iteration on named cursors.

View File

@ -254,8 +254,15 @@ the SQL string that would be sent to the database.
types are `!buffer` (only available in Python 2), `!memoryview` (available
from Python 2.7), `!bytearray` (available from Python 2.6) and `!bytes`
(only form Python 3: the name is available from Python 2.6 but it's only an
alias for the type `!str`). Received data is returned as `!buffer` (in
Python 2) or `!memoryview` (in Python 3).
alias for the type `!str`). Any object implementing the `Revised Buffer
Protocol`__ should be usable as binary type where the protocol is supported
(i.e. from Python 2.6). Received data is returned as `!buffer` (in Python 2)
or `!memoryview` (in Python 3).
.. __: http://www.python.org/dev/peps/pep-3118/
.. versionchanged:: 2.4
only strings were supported before.
.. note::