Changeset 795 for trunk/docs


Ignore:
Timestamp:
Jan 28, 2016, 3:08:51 PM (3 years ago)
Author:
cito
Message:

Update changelog with latest changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/contents/changelog.rst

    r791 r795  
    44Version 5.0
    55-----------
    6 - This version runs on both Python 2 and Python 3.
     6- This version now runs on both Python 2 and Python 3.
    77- The supported versions are Python 2.6 to 2.7, and 3.3 to 3.5.
    88- PostgreSQL is supported in all versions from 9.0 to 9.5.
    9 - The DB-API 2 module now always returns result rows as named tuples
    10   instead of simply lists as before. The documentation explains how
    11   you can restore the old behavior or use custom row objects instead.
    12 - The names of the various types supported by the classic and DB-API 2
    13   modules have been renamed to become simpler, more intuitive and in
    14   line with the names used in the DB-API 2 documentation.
    15   Since the API provides objects of these types only by the use of
    16   constructor functions, this should not cause any incompatibilities.
    17 - The DB-API 2 module now supports the callproc() cursor method. Note
    18   that output parameters are currently not replaced in the return value.
    19 - The DB-API 2 module no supports copy operations between data streams
    20   on the client and database tables via the COPY command of PostgreSQL.
    21   The cursor method copy_from() can be used to copy data from the database
    22   to the client, and the cursor method copy_to() can be used to copy data
    23   from the client to the database.
    24 - The 7-tuples returned by the description attribute of a pgdb cursor
    25   are now named tuples, i.e. their elements can be also accessed by name.
    26   The column names and types can now also be requested through the
    27   colnames and coltypes attributes, which are not part of DB-API 2 though.
    28 - If you pass a Python list as one of the parameters to a DB-API 2 cursor,
    29   it is now automatically bound as a PostgreSQL array. If you pass a Python
    30   tuple, it is bound as a PostgreSQL composite type. Inversely, if a query
    31   returns a PostgreSQL array, it is passed to Python as a list, and if it
    32   returns a PostgreSQL composite type, it is passed to Python as a (named)
    33   tuple. PyGreSQL uses the special input and output syntax for PostgreSQL
    34   arrays and composite types in all of these cases. Anonymous composite
    35   types are returned as ordinary (unnamed) tuples with string values.
    36 - Re-activated the shortcut methods of the DB-API connection since they
    37   can be handy when doing experiments or writing quick scripts. We keep
    38   them undocumented though and discourage using them in production.
    39 - The tty parameter and attribute of database connections has been
    40   removed since it is not supported any more since PostgreSQL 7.4.
    41 - The classic interface got two new methods get_as_list() and get_as_dict()
    42   returning a database table as a Python list or dict. The amount of data
    43   returned can be controlled with various parameters.
    44 - A method upsert() has been added to the DB wrapper class that exploits the
    45   "upsert" feature that is new in PostgreSQL 9.5. The new method nicely
    46   complements the existing get/insert/update/delete() methods.
    47 - You can now insert() PostgreSQL arrays as lists in the classic module.
    48 - A fast parser for PostgreSQL array output syntax has been added to the
    49   C module. Data in an array type column is now returned as a Python list,
    50   which can be nested if the array has more than one dimension.
    51 - PyGreSQL now supports the JSON and JSONB data types, converting such
    52   columns automatically to and from Python objects. If you want to insert
    53   Python objects as JSON data using DB-API 2, you should wrap them in the
    54   new Json() type constructor as a hint to PyGreSQL.
    55 - The pkey() method of the classic interface now returns tuples instead
    56   of frozenset. The order of the tuples is like in the primary key index.
    57 - The classic module now also returns bytea columns fetched from the database
    58   as byte strings, you don't need to call unescape_bytea() any more.
    59 - The table name that is affixed to the name of the OID column returned
    60   by the get() method of the classic interface will not automatically
    61   be fully qualified any more. This reduces overhead from the interface,
    62   but it means you must always write the table name in the same way when
    63   you call the methods using it and you are using tables with OIDs.
    64   Also, OIDs are now only used when access via primary key is not possible.
    65   Note that OIDs are considered deprecated anyway, and they are not created
    66   by default any more in PostgreSQL 8.1 and later.
    67 - The internal caching and automatic quoting of class names in the classic
    68   interface has been simplified and improved, it should now perform better
    69   and use less memory. Also, overhead for quoting and escaping values in the
    70   DB wrapper methods has been reduced and security has been improved by
    71   passing the values to libpq separately as parameters instead of inline.
     9- Changes in the DB-API 2 module (pgdb):
     10  - The DB-API 2 module now always returns result rows as named tuples
     11    instead of simply lists as before. The documentation explains how
     12    you can restore the old behavior or use custom row objects instead.
     13  - The names of the various classes used by the classic and DB-API 2
     14    modules have been renamed to become simpler, more intuitive and in
     15    line with the names used in the DB-API 2 documentation.
     16    Since the API provides only objects of these types through constructor
     17    functions, this should not cause any incompatibilities.
     18  - The DB-API 2 module now supports the callproc() cursor method. Note
     19    that output parameters are currently not replaced in the return value.
     20  - The DB-API 2 module now supports copy operations between data streams
     21    on the client and database tables via the COPY command of PostgreSQL.
     22    The cursor method copy_from() can be used to copy data from the database
     23    to the client, and the cursor method copy_to() can be used to copy data
     24    from the client to the database.
     25  - The 7-tuples returned by the description attribute of a pgdb cursor
     26    are now named tuples, i.e. their elements can be also accessed by name.
     27    The column names and types can now also be requested through the
     28    colnames and coltypes attributes, which are not part of DB-API 2 though.
     29  - If you pass a Python list as one of the parameters to a DB-API 2 cursor,
     30    it is now automatically bound using an ARRAY constructor. If you pass a
     31    Python tuple, it is bound using a ROW constructor. This is useful for
     32    passing records as well as making use of the IN syntax.
     33  - Inversely, when a fetch method of a DB-API 2 cursor returns a PostgreSQL
     34    array, it is passed to Python as a list, and when it returns a PostgreSQL
     35    composite type, it is passed to Python as a named tuple. PyGreSQL uses
     36    a new fast built-in parser to achieve this. Anonymous composite types are
     37    also supported, but yield only an ordinary tuple containing text strings.
     38- Changes in the classic PyGreSQL module (pg):
     39  - The classic interface got two new methods get_as_list() and get_as_dict()
     40    returning a database table as a Python list or dict. The amount of data
     41    returned can be controlled with various parameters.
     42  - A method upsert() has been added to the DB wrapper class that utilitses
     43    the "upsert" feature that is new in PostgreSQL 9.5. The new method nicely
     44    complements the existing get/insert/update/delete() methods.
     45  - When using insert/update/upsert(), you can now pass PostgreSQL arrays as
     46    lists and PostgreSQL records as tuples in the classic module.
     47  - Conversely, when the query method returns a PostgreSQL array, it is passed
     48    to Python as a list. PostgreSQL records are converted to named tuples as
     49    well, but only if you use one of the get/insert/update/delete() methods.
     50    PyGreSQL uses a new fast built-in parser to achieve this.
     51  - The pkey() method of the classic interface now returns tuples instead
     52    of frozenset. The order of the tuples is like in the primary key index.
     53  - Like the DB-API 2 module, the classic module now also returns bytea columns
     54    fetched from the database as byte strings, so you don't need to call
     55    unescape_bytea() any more.
     56  - A method set_jsondecode() has been added for changing or removing the
     57    function that automatically decodes JSON data coming from the database.
     58    By default, decoding JSON is now enabled and uses the decoder function
     59    in the standard library with its default parameters.
     60  - The table name that is affixed to the name of the OID column returned
     61    by the get() method of the classic interface will not automatically
     62    be fully qualified any more. This reduces overhead from the interface,
     63    but it means you must always write the table name in the same way when
     64    you call the methods using it and you are using tables with OIDs.
     65    Also, OIDs are now only used when access via primary key is not possible.
     66    Note that OIDs are considered deprecated anyway, and they are not created
     67    by default any more in PostgreSQL 8.1 and later.
     68  - The internal caching and automatic quoting of class names in the classic
     69    interface has been simplified and improved, it should now perform better
     70    and use less memory. Also, overhead for quoting values in the DB wrapper
     71    methods has been reduced and security has been improved by passing the
     72    values to libpq separately as parameters instead of inline.
     73  - It is now possible to use regular type names instead of the simpler
     74    type names that are used by default in PyGreSQL, without breaking any
     75    of the mechanisms for quoting and typecasting, which rely on the type
     76    information. This is achieved while maintaining simplicity and backward
     77    compatibility by augmenting the type name string objects with all the
     78    necessary information under the cover. To switch regular type names on
     79    or off (this is the default), call the DB wrapper method use_regtypes().
     80  - The methods for adapting and typecasting values pertaining to PostgreSQL
     81    types have been refactored and swapped out to separate classes.
     82- Changes concerning both modules:
     83  - PyGreSQL now supports the JSON and JSONB data types, converting such
     84    columns automatically to and from Python objects. If you want to insert
     85    Python objects as JSON data using DB-API 2, you should wrap them in the
     86    new Json() type constructor as a hint to PyGreSQL.
     87  - Fast parsers for the input and output syntax for PostgreSQL arrays and
     88    composite types have been added to the C module. Note that you can also
     89    use multi-dimensional arrays with PyGreSQL.
     90  - The tty parameter and attribute of database connections has been
     91    removed since it is not supported any more since PostgreSQL 7.4.
    7292
    7393Version 4.2 (2016-01-21)
Note: See TracChangeset for help on using the changeset viewer.