You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm exploring how to use vet rules, and I was trying out the example rule "postgresql.explain.plan.node_type == 'Seq Scan'". Since I didn't see some results I expected, I tried using SQLCDEBUG=dumpexplain=1, and I realized that the seq scans I was looking for weren't caught because they occurred in a nested plan, rather than the top-level plan for a query. I've been studying https://github.com/google/cel-spec/blob/master/doc/langdef.md and trying to find a generic way to query all nested plans (to any depth) for node_type of Seq Scan, and I'm not having any luck. It feels like we need to traverse the plans recursively, and I'm not seeing a way to do that with the builtin CEL functions. Any ideas?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm exploring how to use vet rules, and I was trying out the example rule
"postgresql.explain.plan.node_type == 'Seq Scan'"
. Since I didn't see some results I expected, I tried usingSQLCDEBUG=dumpexplain=1
, and I realized that the seq scans I was looking for weren't caught because they occurred in a nested plan, rather than the top-level plan for a query. I've been studying https://github.com/google/cel-spec/blob/master/doc/langdef.md and trying to find a generic way to query all nested plans (to any depth) for node_type of Seq Scan, and I'm not having any luck. It feels like we need to traverse the plans recursively, and I'm not seeing a way to do that with the builtin CEL functions. Any ideas?Beta Was this translation helpful? Give feedback.
All reactions