diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-14 20:52:57 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-14 20:52:57 -0400 |
| commit | dc31eb352aed6b578b7cf0bbc0d4290b6d11f2b2 (patch) | |
| tree | f57fb2bf5a70d46aa0515ad488195d5d1f3e93c0 /lib/sqlalchemy/dialects/postgresql/base.py | |
| parent | 504fd37d6848005730c8c68769ba9e06f83551dc (diff) | |
| parent | ff1d504fc4b7df2284b9f261cd03a7568b7038e8 (diff) | |
| download | sqlalchemy-dc31eb352aed6b578b7cf0bbc0d4290b6d11f2b2.tar.gz | |
merge tip
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 5eba16372..89769b8c0 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -39,16 +39,17 @@ apply; no RETURNING clause is emitted nor is the sequence pre-executed in this case. To force the usage of RETURNING by default off, specify the flag -``implicit_returning=False`` to :func:`create_engine`. +``implicit_returning=False`` to :func:`.create_engine`. Transaction Isolation Level --------------------------- -:func:`create_engine` accepts an ``isolation_level`` parameter which results +:func:`.create_engine` accepts an ``isolation_level`` parameter which results in the command ``SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL <level>`` being invoked for every new connection. Valid values for this parameter are ``READ_COMMITTED``, ``READ_UNCOMMITTED``, ``REPEATABLE_READ``, -and ``SERIALIZABLE``. +and ``SERIALIZABLE``. Note that the psycopg2 dialect does *not* use this +technique and uses psycopg2-specific APIs (see that dialect for details). INSERT/UPDATE...RETURNING ------------------------- @@ -57,7 +58,7 @@ The dialect supports PG 8.2's ``INSERT..RETURNING``, ``UPDATE..RETURNING`` and ``DELETE..RETURNING`` syntaxes. ``INSERT..RETURNING`` is used by default for single-row INSERT statements in order to fetch newly generated primary key identifiers. To specify an explicit ``RETURNING`` clause, -use the :meth:`_UpdateBase.returning` method on a per-statement basis:: +use the :meth:`._UpdateBase.returning` method on a per-statement basis:: # INSERT..RETURNING result = table.insert().returning(table.c.col1, table.c.col2).\\ |
