Changeset 818 for trunk/docs


Ignore:
Timestamp:
Feb 4, 2016, 3:56:19 PM (3 years ago)
Author:
cito
Message:

Add list of supported data types.

Location:
trunk/docs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/about.rst

    r779 r818  
    2929**PyGreSQL** is a Python module that interfaces to a PostgreSQL database.
    3030It embeds the PostgreSQL query library to allow easy use of the powerful
    31 PostgreSQL features from a Python script.
     31PostgreSQL features from a Python script or application.
    3232
    3333PyGreSQL is developed and tested on a NetBSD system, but it also runs on
  • trunk/docs/contents/pg/adaptation.rst

    r814 r818  
    1212detail in case you want to better understand or change the default
    1313behavior of PyGreSQL.
     14
     15Supported data types
     16--------------------
     17
     18The following automatic data type conversions are supported by PyGreSQL
     19out of the box.  If you need other automatic type conversions or want to
     20change the default conversions, you can achieve this by using the methods
     21explained in the next two sections.
     22
     23================================== ==================
     24PostgreSQL                          Python
     25================================== ==================
     26char, bpchar, name, text, varchar  str
     27bool                               bool
     28bytea                              bytes
     29int2, int4, int8, oid, serial      int [#int8]_
     30int2vector                         list of int
     31float4, float8                     float
     32numeric, money                     Decimal
     33date                               datetime.date
     34time, timetz                       datetime.time
     35timestamp, timestamptz             datetime.datetime
     36interval                           datetime.timedelta
     37hstore                             dict
     38json, jsonb                        list or dict
     39array                              list
     40record                             tuple
     41================================== ==================
     42
     43.. note::
     44
     45    Elements of arrays and records will also be converted accordingly.
     46
     47    .. [#int8] int8 is converted to long in Python 2
    1448
    1549Adaptation of parameters
  • trunk/docs/contents/pgdb/adaptation.rst

    r814 r818  
    1313behavior of PyGreSQL.
    1414
     15Supported data types
     16--------------------
     17
     18The following automatic data type conversions are supported by PyGreSQL
     19out of the box.  If you need other automatic type conversions or want to
     20change the default conversions, you can achieve this by using the methods
     21explained in the next two sections.
     22
     23================================== ==================
     24PostgreSQL                          Python
     25================================== ==================
     26char, bpchar, name, text, varchar  str
     27bool                               bool
     28bytea                              bytes
     29int2, int4, int8, oid, serial      int [#int8]_
     30int2vector                         list of int
     31float4, float8                     float
     32numeric, money                     Decimal
     33date                               datetime.date
     34time, timetz                       datetime.time
     35timestamp, timestamptz             datetime.datetime
     36interval                           datetime.timedelta
     37hstore                             dict
     38json, jsonb                        list or dict
     39array                              list
     40record                             tuple
     41================================== ==================
     42
     43.. note::
     44
     45    Elements of arrays and records will also be converted accordingly.
     46
     47    .. [#int8] int8 is converted to long in Python 2
     48
    1549Adaptation of parameters
    1650------------------------
Note: See TracChangeset for help on using the changeset viewer.