From 59151886a02db66b91ed251a937d583a4c6a77b5 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 22 Sep 2012 02:10:58 +0100 Subject: [PATCH] Info about hstore versions history moved from code to docs --- doc/src/extras.rst | 9 +++++++++ lib/extras.py | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/doc/src/extras.rst b/doc/src/extras.rst index f3f10b12..ce0e8315 100644 --- a/doc/src/extras.rst +++ b/doc/src/extras.rst @@ -154,6 +154,15 @@ can be enabled using the `register_hstore()` function. .. autofunction:: register_hstore + .. versionchanged:: 2.4 + added the *oid* parameter. If not specified, the typecaster is + installed also if |hstore| is not installed in the :sql:`public` + schema. + + .. versionchanged:: 2.4.3 + added support for |hstore| array. + + .. |hstore| replace:: :sql:`hstore` .. _hstore: http://www.postgresql.org/docs/current/static/hstore.html diff --git a/lib/extras.py b/lib/extras.py index 3fd1fb0c..b01e6e7a 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -742,7 +742,6 @@ def register_hstore(conn_or_curs, globally=False, unicode=False, 'hstore'::regtype::oid`. Analogously you can obtain a value for *array_oid* using a query such as :sql:`SELECT 'hstore[]'::regtype::oid`. - Note that, when passing a dictionary from Python to the database, both strings and unicode keys and values are supported. Dictionaries returned from the database have keys/values according to the *unicode* parameter. @@ -750,15 +749,6 @@ def register_hstore(conn_or_curs, globally=False, unicode=False, The |hstore| contrib module must be already installed in the database (executing the ``hstore.sql`` script in your ``contrib`` directory). Raise `~psycopg2.ProgrammingError` if the type is not found. - - .. versionchanged:: 2.4 - added the *oid* parameter. If not specified, the typecaster is - installed also if |hstore| is not installed in the :sql:`public` - schema. - - .. versionchanged:: 2.4.3 - added support for |hstore| array. - """ if oid is None: oid = HstoreAdapter.get_oids(conn_or_curs)