Add text-to-sql module: schema prompt through a restricted role, JSqlParser guard, read-only role with column grants and timeout, row cap, execution-based evaluation on a real PostgreSQL

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JXVi2GMQ7bR5EmbUFdDj7N
This commit is contained in:
Claude
2026-10-09 07:22:28 +00:00
parent d67ac0630b
commit 85a3359186
26 changed files with 1179 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
# Row cap and statement timeout (cap = 100 rows)
1000-row table, cap 100: rows returned 100, truncated true
exactly 100 matching rows, cap 100: rows returned 100, truncated false
7 matching rows, cap 100: rows returned 7, truncated false
a billion-row join, cap 100: rows returned 100, truncated true (the server stopped producing rows)
2 billion generated rows, cap 100: ERROR: canceling statement due to statement timeout (the row cap did not help here)
count(*) over 2 billion rows: ERROR: canceling statement due to statement timeout
stopped within 5 seconds of starting: true (role setting statement_timeout = 2s)