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:
@@ -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)
|
||||
Reference in New Issue
Block a user