Skip to content

Commit 5208a48

Browse files
committed
Added rule engine. Compatible with all SQL now
1 parent 54511e6 commit 5208a48

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,14 @@ pattern = re.compile(r'^.*\bpg_\w+\s*\(.*$', re.IGNORECASE)
159159
sql = "SELECT pg_backend_pid()"
160160
print(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/*` |

0 commit comments

Comments
 (0)