diff --git a/edb/pgsql/compiler/dml.py b/edb/pgsql/compiler/dml.py index 11cd9158f71..077eb53a6fc 100644 --- a/edb/pgsql/compiler/dml.py +++ b/edb/pgsql/compiler/dml.py @@ -382,6 +382,7 @@ def merge_iterator( put_iterator_bond(iterator, select) relctx.include_rvar( select, iterator_rvar, + aspects=('source', 'value', iterator.aspect), path_id=iterator.path_id, overwrite_path_rvar=True, ctx=ctx) diff --git a/edb/pgsql/compiler/relctx.py b/edb/pgsql/compiler/relctx.py index 552fbc3f7b6..43ba9cf7c98 100644 --- a/edb/pgsql/compiler/relctx.py +++ b/edb/pgsql/compiler/relctx.py @@ -212,7 +212,7 @@ def include_rvar( Compiler context. """ if aspects is None: - aspects = ('value', 'iterator') + aspects = ('value',) if path_id.is_objtype_path(): if isinstance(rvar, pgast.RangeSubselect): if pathctx.has_path_aspect(