summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/ext.py
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2021-03-04 06:55:53 -0700
committerMike Bayer <mike_mp@zzzcomputing.com>2021-03-04 11:10:44 -0500
commit780213bfefac7046ac889ffbc1c51e0d244dd678 (patch)
tree9c484325dc309fb858a644b3e5c72c6c48acf96e /lib/sqlalchemy/dialects/postgresql/ext.py
parenta63b23392fc31766e32b8650127d9006ee189a0f (diff)
downloadsqlalchemy-780213bfefac7046ac889ffbc1c51e0d244dd678.tar.gz
Fix aggregate_order_by issue
Fixes: #5989 Using array_agg() with aggregate_order_by() in postgresql would sometimes return ARRAY(NullType) instead of ARRAY(actual_type). Change-Id: I05a0b2b7ea59291e3c04575578adcc337296e5a8
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/ext.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/ext.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/ext.py b/lib/sqlalchemy/dialects/postgresql/ext.py
index 71a0aa5a6..959e6597b 100644
--- a/lib/sqlalchemy/dialects/postgresql/ext.py
+++ b/lib/sqlalchemy/dialects/postgresql/ext.py
@@ -57,6 +57,7 @@ class aggregate_order_by(expression.ColumnElement):
def __init__(self, target, *order_by):
self.target = coercions.expect(roles.ExpressionElementRole, target)
+ self.type = self.target.type
_lob = len(order_by)
if _lob == 0: