diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-07-12 12:14:50 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-07-12 12:14:50 -0400 |
commit | d08a6d291d08e416853503f2f8cc19a5301a4b6b (patch) | |
tree | bab8c59725e40b944b3279efe047c78e2844b2a8 /lib/sqlalchemy/sql/expression.py | |
parent | 0abd571f6eadc8d846f8eeea97b0eaaabb57af27 (diff) | |
download | sqlalchemy-d08a6d291d08e416853503f2f8cc19a5301a4b6b.tar.gz |
- use inline=True for the insert..select here so it works on oracle
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r-- | lib/sqlalchemy/sql/expression.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 9e5c4cfcb..08ef20a89 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -6454,6 +6454,17 @@ class Insert(ValuesBase): would normally raise an exception if these column lists don't correspond. + .. note:: + + Depending on backend, it may be necessary for the :class:`.Insert` + statement to be constructed using the ``inline=True`` flag; this + flag will prevent the implicit usage of ``RETURNING`` when the + ``INSERT`` statement is rendered, which isn't supported on a backend + such as Oracle in conjunction with an ``INSERT..SELECT`` combination:: + + sel = select([table1.c.a, table1.c.b]).where(table1.c.c > 5) + ins = table2.insert(inline=True).from_select(['a', 'b'], sel) + .. versionadded:: 0.8.3 """ |