diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2016-10-11 03:58:09 +0100 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2016-10-11 04:54:41 +0100 |
| commit | 643ba70bad0f19a68c06ec95de2691c28e060e48 (patch) | |
| tree | d9504de513e795a5132db605440c76407ba42906 /doc/src/extras.rst | |
| parent | 706ad2f177d5e3250643765446e66b82e9849648 (diff) | |
| download | psycopg2-643ba70bad0f19a68c06ec95de2691c28e060e48.tar.gz | |
Added ipaddress objects conversion
Close #387
Diffstat (limited to 'doc/src/extras.rst')
| -rw-r--r-- | doc/src/extras.rst | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/doc/src/extras.rst b/doc/src/extras.rst index cf871af..d33b8ee 100644 --- a/doc/src/extras.rst +++ b/doc/src/extras.rst @@ -933,18 +933,27 @@ UUID data type pair: CIDR; Data types pair: MACADDR; Data types -Networking data type -^^^^^^^^^^^^^^^^^^^^ +.. _adapt-network: + +Networking data types +^^^^^^^^^^^^^^^^^^^^^ -Psycopg casts the PostgreSQL networking data types (:sql:`inet`, :sql:`cidr`, -:sql:`macaddr`) into ordinary strings. However their array are detected as -arrays and directly cast into lists. +By default Psycopg casts the PostgreSQL networking data types (:sql:`inet`, +:sql:`cidr`, :sql:`macaddr`) into ordinary strings; array of such types are +converted into lists of strings. .. versionchanged:: 2.7 - in previous version array of networking types were not treated as arrays + in previous version array of networking types were not treated as arrays. + +.. autofunction:: register_ipaddress + .. autofunction:: register_inet + .. deprecated:: 2.7 + this function will not receive further development and disappear in + future versions. + .. doctest:: >>> psycopg2.extras.register_inet() @@ -957,16 +966,12 @@ arrays and directly cast into lists. >>> cur.fetchone()[0].addr '192.168.0.1/24' -.. deprecated:: 2.7 - this function will not receive further development and disappear in future - versions - .. autoclass:: Inet -.. deprecated:: 2.7 - this object will not receive further development and disappear in future - versions + .. deprecated:: 2.7 + this object will not receive further development and may disappear in + future versions. .. index:: |
