Skip to content

Commit

Permalink
dont look into path_namespace directly, try to maybe_get_path_rvar in…
Browse files Browse the repository at this point in the history
…stead
  • Loading branch information
aljazerzen committed Feb 2, 2024
1 parent ff70cf8 commit 6831638
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion edb/pgsql/compiler/relctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,10 @@ def create_iterator_identity_for_path(
if apply_volatility:
apply_volatility_ref(stmt, ctx=ctx)

if (path_id, 'iterator') not in stmt.path_namespace:
already_exists = isinstance(stmt, pgast.Query) and (
maybe_get_path_rvar(stmt, path_id, aspect='iterator', ctx=ctx) != None
)
if not already_exists:
id_expr = pgast.FuncCall(
name=('edgedb', 'uuid_generate_v4'),
args=[],
Expand Down

0 comments on commit 6831638

Please sign in to comment.