Skip to content

Commit fc2797c

Browse files
committed
debug enhancements and raw support
1 parent 359a2fb commit fc2797c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,26 @@ You can use basic Unix commands to check for patterns like pg_ functions directl
289289
| Count occurrences of each function | `grep -oE '\bpg_[a-zA-Z0-9_]+\(' chunks/* \| sort \| uniq -c \| sort -nr` |
290290
| Full SQL lines containing pg\_\* | `grep -E '\bpg_[a-zA-Z0-9_]+\(' chunks/*` |
291291

292+
ALso, before or after running `crdb-sql-audit`, you can inspect your logs to see how often common filters appear.
293+
294+
For example, to count usage of PostgreSQL built-ins and log patterns:
295+
296+
```bash
297+
{
298+
echo "🔍 pg_* function usage:"
299+
grep -oE '\bpg_[a-zA-Z0-9_]+\(' chunks/* | sort | uniq -c | sort -nr
300+
echo ""
301+
echo "🔍 PostgreSQL LOG prefixes:"
302+
grep -oE 'LOG: execute|LOG: statement:|LOG: duration:' chunks/* | sort | uniq -c | sort -nr
303+
}
304+
````
305+
306+
This will show counts of:
307+
308+
* Each `pg_` function used (e.g. `pg_backend_pid(`)
309+
* Number of log lines using `LOG: execute`, `LOG: statement:`, and `LOG: duration:`
310+
311+
> ✅ Useful for checking whether your filters (`--filters`) are likely to match anything in the input.
292312

293313
---
294314

0 commit comments

Comments
 (0)