summaryrefslogtreecommitdiff
path: root/doc/build/changelog
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build/changelog')
-rw-r--r--doc/build/changelog/unreleased_14/5127.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/build/changelog/unreleased_14/5127.rst b/doc/build/changelog/unreleased_14/5127.rst
new file mode 100644
index 000000000..94e584649
--- /dev/null
+++ b/doc/build/changelog/unreleased_14/5127.rst
@@ -0,0 +1,19 @@
+.. change::
+ :tags: bug, sql
+ :tickets: 5127
+
+ Improved the :func:`_sql.tuple_` construct such that it behaves predictably
+ when used in a columns-clause context. The SQL tuple is not supported as a
+ "SELECT" columns clause element on most backends; on those that do
+ (PostgreSQL, not surprisingly), the Python DBAPI does not have a "nested
+ type" concept so there are still challenges in fetching rows for such an
+ object. Use of :func:`_sql.tuple_` in a :func:`_sql.select` or
+ :class:`_orm.Query` will now raise a :class:`_exc.CompileError` at the
+ point at which the :func:`_sql.tuple_` object is seen as presenting itself
+ for fetching rows (i.e., if the tuple is in the columns clause of a
+ subquery, no error is raised). For ORM use,the :class:`_orm.Bundle` object
+ is an explicit directive that a series of columns should be returned as a
+ sub-tuple per row and is suggested by the error message. Additionally ,the
+ tuple will now render with parenthesis in all contexts. Previously, the
+ parenthesization would not render in a columns context leading to
+ non-defined behavior.