-
Notifications
You must be signed in to change notification settings - Fork 923
-
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 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?
Beta Was this translation helpful? Give feedback.