Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

vet: how to inspect nested plans recursively? #3282

Unanswered
ncabatoff asked this question in Q&A
Discussion options

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?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /