timetz adaptation documented

This commit is contained in:
Daniele Varrazzo 2014-12-25 14:57:31 +01:00
parent 4dbda02145
commit 6bccb05c90
2 changed files with 8 additions and 2 deletions

5
NEWS
View File

@ -4,6 +4,11 @@ Current release
What's new in psycopg 2.6
-------------------------
New features:
- Python `time` objects with a tzinfo specified and PostgreSQL :sql:`timetz`
data are converted into each other (ticket #272).
Bug fixes:
- Json apapter's `!str()` returns the adapted content instead of the `!repr()`

View File

@ -245,7 +245,8 @@ types:
+--------------------+-------------------------+--------------------------+
| `!date` | :sql:`date` | :ref:`adapt-date` |
+--------------------+-------------------------+ |
| `!time` | :sql:`time` | |
| `!time` | | :sql:`time` | |
| | | :sql:`timetz` | |
+--------------------+-------------------------+ |
| `!datetime` | | :sql:`timestamp` | |
| | | :sql:`timestamptz` | |
@ -482,7 +483,7 @@ Date/Time objects adaptation
Python builtin `~datetime.datetime`, `~datetime.date`,
`~datetime.time`, `~datetime.timedelta` are converted into PostgreSQL's
:sql:`timestamp[tz]`, :sql:`date`, :sql:`time`, :sql:`interval` data types.
:sql:`timestamp[tz]`, :sql:`date`, :sql:`time[tz]`, :sql:`interval` data types.
Time zones are supported too. The Egenix `mx.DateTime`_ objects are adapted
the same way::