summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-06-08 15:55:08 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-06-08 15:55:08 -0400
commit27f7c595d216c8b1d87e5a3648ada09f684542d9 (patch)
treede07aa5ef8c3c012a322ab076897a62a07e11fe4 /lib/sqlalchemy/dialects/postgresql
parent97e97324d67056972b1f959ce41d0be441cec992 (diff)
downloadsqlalchemy-27f7c595d216c8b1d87e5a3648ada09f684542d9.tar.gz
Add some `Sphinx` paragraph level versions informations markups,
such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py17
-rw-r--r--lib/sqlalchemy/dialects/postgresql/psycopg2.py5
2 files changed, 14 insertions, 8 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 85665dc41..29f1651fb 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -82,9 +82,10 @@ to inspect the actual value using::
SHOW search_path;
-Prior to version 0.7.3, cross-schema foreign keys when the schemas
-were also in the ``search_path`` could make an incorrect assumption
-if the schemas were explicitly stated on each :class:`.Table`.
+.. versionchanged:: 0.7.3
+ Prior to this version, cross-schema foreign keys when the schemas
+ were also in the ``search_path`` could make an incorrect assumption
+ if the schemas were explicitly stated on each :class:`.Table`.
Background on PG's ``search_path`` is at:
http://www.postgresql.org/docs/9.0/static/ddl-schemas.html#DDL-SCHEMAS-PATH
@@ -137,7 +138,7 @@ Operator Classes
PostgreSQL allows the specification of an *operator class* for each column of
an index (see http://www.postgresql.org/docs/8.3/interactive/indexes-opclass.html).
The :class:`.Index` construct allows these to be specified via the ``postgresql_ops``
-keyword argument (new as of SQLAlchemy 0.7.2)::
+keyword argument::
Index('my_index', my_table.c.id, my_table.c.data,
postgresql_ops={
@@ -145,6 +146,9 @@ keyword argument (new as of SQLAlchemy 0.7.2)::
'id': 'int4_ops'
})
+.. versionadded:: 0.7.2
+ ``postgresql_ops`` keyword argument to :class:`.Index` construct.
+
Note that the keys in the ``postgresql_ops`` dictionary are the "key" name of
the :class:`.Column`, i.e. the name used to access it from the ``.c`` collection
of :class:`.Table`, which can be configured to be different than the actual
@@ -467,8 +471,9 @@ class ENUM(sqltypes.Enum):
the :meth:`~.postgresql.ENUM.create` and
:meth:`~.postgresql.ENUM.drop` methods can
be used to emit SQL to a target bind.
- (new in 0.7.4)
-
+
+ .. versionadded:: 0.7.4
+
"""
self.create_type = kw.pop("create_type", True)
super(ENUM, self).__init__(*enums, **kw)
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py
index 5aa93978b..ec8d0f219 100644
--- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py
+++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py
@@ -96,8 +96,9 @@ on all new connections based on the value passed to
engine = create_engine("postgresql://user:pass@host/dbname", client_encoding='utf8')
This overrides the encoding specified in the Postgresql client configuration.
-The psycopg2-specific ``client_encoding`` parameter to :func:`.create_engine` is new as of
-SQLAlchemy 0.7.3.
+
+.. versionadded:: 0.7.3
+ The psycopg2-specific ``client_encoding`` parameter to :func:`.create_engine`.
SQLAlchemy can also be instructed to skip the usage of the psycopg2
``UNICODE`` extension and to instead utilize it's own unicode encode/decode