Changeset 895 for trunk


Ignore:
Timestamp:
Sep 23, 2016, 10:23:48 AM (3 years ago)
Author:
cito
Message:

Add note about conversion of arrays to lists

Location:
trunk/docs/contents
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/contents/pg/adaptation.rst

    r821 r895  
    3838json, jsonb                        list or dict
    3939uuid                               uuid.UUID
    40 array                              list
     40array                              list [#array]_
    4141record                             tuple
    4242================================== ==================
     
    4747
    4848    .. [#int8] int8 is converted to long in Python 2
     49
     50    .. [#array] The first element of the array will always be the first element
     51       of the Python list, no matter what the lower bound of the PostgreSQL
     52       array is. The information about the start index of the array (which is
     53       usually 1 in PostgreSQL, but can also be different from 1) is ignored
     54       and gets lost in the conversion to the Python list. If you need that
     55       information, you can request it separately with the `array_lower()`
     56       function provided by PostgreSQL.
     57
    4958
    5059Adaptation of parameters
  • trunk/docs/contents/pg/db_wrapper.rst

    r872 r895  
    322322
    323323Note that since PyGreSQL 5.0 this will return the value of an array
    324 type column as a Python list.
     324type column as a Python list by default.
    325325
    326326insert -- insert a row into a database table
  • trunk/docs/contents/pgdb/adaptation.rst

    r821 r895  
    3838json, jsonb                        list or dict
    3939uuid                               uuid.UUID
    40 array                              list
     40array                              list [#array]_
    4141record                             tuple
    4242================================== ==================
     
    4747
    4848    .. [#int8] int8 is converted to long in Python 2
     49
     50    .. [#array] The first element of the array will always be the first element
     51       of the Python list, no matter what the lower bound of the PostgreSQL
     52       array is. The information about the start index of the array (which is
     53       usually 1 in PostgreSQL, but can also be different from 1) is ignored
     54       and gets lost in the conversion to the Python list. If you need that
     55       information, you can request it separately with the `array_lower()`
     56       function provided by PostgreSQL.
    4957
    5058Adaptation of parameters
Note: See TracChangeset for help on using the changeset viewer.