mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 12:23:42 +03:00
Documentation about new support for binary objects improved
This commit is contained in:
parent
bccbcf42d0
commit
3b10ef8998
5
NEWS
5
NEWS
|
@ -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.
|
||||
|
|
|
@ -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::
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user