From: Mike Bayer Date: Fri, 10 Oct 2014 21:17:34 +0000 (-0400) Subject: - fix the marker here so this page can be found X-Git-Tag: rel_0_9_8~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1475d02c74daea63e0b6772e78d2ac67ce80639;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - fix the marker here so this page can be found - clarify the note about the defaults, note that it's upcoming in 1.0 --- diff --git a/doc/build/core/defaults.rst b/doc/build/core/defaults.rst index 166273c186..7b426cf746 100644 --- a/doc/build/core/defaults.rst +++ b/doc/build/core/defaults.rst @@ -1,6 +1,7 @@ +.. module:: sqlalchemy.schema + .. _metadata_defaults_toplevel: .. _metadata_defaults: -.. module:: sqlalchemy.schema Column Insert/Update Defaults ============================== diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py index 62be3a2865..910806ebbe 100644 --- a/lib/sqlalchemy/sql/dml.py +++ b/lib/sqlalchemy/sql/dml.py @@ -516,10 +516,12 @@ class Insert(ValuesBase): .. note:: - A SELECT..INSERT construct in SQL has no VALUES clause. Therefore - :class:`.Column` objects which utilize Python-side defaults - (e.g. as described at :ref:`metadata_defaults_toplevel`) - will **not** take effect when using :meth:`.Insert.from_select`. + Python-side and SQL function defaults, as described at + :ref:`metadata_defaults_toplevel`, are **not** automatically + included in the SELECT statement as rendered unless explicitly + added to the statement. The behavior of automatically rendering + these default values and expressions is available as of SQLAlchemy + version 1.0.0. .. versionadded:: 0.8.3