File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -159,3 +159,14 @@ pattern = re.compile(r'^.*\bpg_\w+\s*\(.*$', re.IGNORECASE)
159159sql = "SELECT pg_backend_pid()"
160160print(bool(pattern.search(sql))) # ✅ True
161161` ` `
162+
163+ # ## 🛠 Validate with Shell
164+ You can use basic Unix commands to check for patterns like pg_ functions directly in your log chunks :
165+
166+
167+ | Task | Command |
168+ |------------------------------------|---------------------------------------------------------------------------|
169+ | Total matches across chunks | `grep -oE '\bpg_[a-zA-Z0-9_]+\(' chunks/* \| wc -l` |
170+ | Unique function names | `grep -oE '\bpg_[a-zA-Z0-9_]+\(' chunks/* \| sort \| uniq` |
171+ | Count occurrences of each function | `grep -oE '\bpg_[a-zA-Z0-9_]+\(' chunks/* \| sort \| uniq -c \| sort -nr` |
172+ | Full SQL lines containing pg\_\* | `grep -E '\bpg_[a-zA-Z0-9_]+\(' chunks/*` |
You can’t perform that action at this time.
0 commit comments