sha174n commented on PR #43060:
URL: https://github.com/apache/superset/pull/43060#issuecomment-5607886024

   Pushed 808f3b3774. `EXPLAIN ANALYZE <statement>` runs its body for real, so 
a `search_path` rebind inside one takes effect even though sqlglot keeps the 
tail as opaque text. `is_mutating` already normalized that tail and recursed 
into it, so I factored it out as `_explain_analyze_body` and reused it from 
`changes_search_path` rather than text-matching. Re-parsing keeps it precise: 
`EXPLAIN ANALYZE SELECT * FROM search_path_audit` stays false.
   
   Same commit also accepts a flag with no trailing whitespace (Postgres takes 
`EXPLAIN ANALYZE(...)`), matches the procedural-body fallback on whole words so 
`reset_config` is not mistaken for `set_config`, and derives 
`_MUTATING_COMMAND_NAMES` from the nested-body heads instead of repeating them. 
New cases in `test_changes_search_path` and 
`test_is_mutating_fails_closed_on_gate_blind_spots`; still mergeable with 
master.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to