AI-generated illustrationBuild a Governed Natural-Language-to-SQL Assistant
Treat the LLM as an untrusted planner behind PostgreSQL 19 RLS, pure-JS AST gates, dispositional outputs, and fail-closed provenance.
- Reading
- 18 min
- Workshop
- 180 min
- Stack
- TS 7.0, Node 22, PostgreSQL 19.0 (PGlite 0.6.1), pgsql-ast-parser 12.0, Claude 5.5, Zod 4
- Version
- 1.0.0
- Last verified
- Dec 1, 2026
01Outcomes
What you will build and be able to do
Each outcome has an observable criterion. The lab and the assessment check exactly these, nothing more and nothing less.
OBJ-001
Enforce tenant isolation inside PostgreSQL 19.0
Provision a NOSUPERUSER NOBYPASSRLS role with FORCE ROW LEVEL SECURITY, REVOKE EXECUTE on pg_catalog.set_config, pinned search_path, fail-closed tenant checks, and SET TRANSACTION READ ONLY.
OBJ-002
Replace regex SQL filters with a strict AST allowlist
Parse every candidate query via pgsql-ast-parser to reject writes, data-modifying CTEs, comments, system schemas, unapproved functions, and unbounded LIMIT clauses.
OBJ-003
Stop 3.225x 1:N x 1:M join fan-out and silent filter drift
Block flat multi-child joins in the AST gate, pre-aggregate child tables by order_id in separate CTEs, and require canonical posted, non-voided, non-sandbox, and currency predicates.
OBJ-004
Ship dispositional Claude 5.5 outputs with verified provenance
Handle native stop_reason refusals fail-closed with sql: null, block summary numbers absent from executed rows, probe LIMIT + 1 truncation, and withhold rows if audit logging fails.
02Prerequisites and setup
Offline clean-room setup (Node 22 + pnpm 12 + PGlite 0.6.1, $0.00)
- Intermediate SQL joins, CTEs, GROUP BY, and PostgreSQL transactions
- TypeScript and Node.js 22 CLI testing workflows
- Prompting and structured outputs as engineering contractsRead Dev Guide 14
- Agent containment and least-privilege boundariesRead Dev Guide 03
# Synthetic data. Simulated services. Runs 100% offline with zero API keys.unzip governed-nl-to-sql-labs.zip && cd governed-nl-to-sql-labs/starterpnpm install --frozen-lockfilenode src/cli.ts preflightPostgreSQL 19.0 (PGlite 0.6.1) | Offline: scripted model double, not Claude ($0.00)03The system picture
Five governance boundaries around an untrusted SQL planner

Extended description
Boundary B1 validates caller tenant_id on a host allowlist, executes as analytics_reader (NOSUPERUSER NOBYPASSRLS), enables and forces Row-Level Security, revokes EXECUTE on pg_catalog.set_config, and opens SET TRANSACTION READ ONLY.
Boundary B2 constrains Claude 5.5 to four explicit dispositions (executable_query, clarify_ambiguous_term, abstain_out_of_scope, abstain_unauthorized) with the caller's authenticated server tenant_id excluded from the prompt and fail-closed handling for stop_reason refusal.
Boundary B3 parses the exact SQL with pgsql-ast-parser to enforce read-only SELECT/WITH/set-operation trees, public allowlisted tables, 18 analytical functions, no SELECT * projection wildcards, LIMIT <= 200, order_id-grained CTE rollups, and structural business predicates.
Boundary B4 applies statement_timeout (1500ms), lock_timeout (500ms), and work_mem (16MB) before EXPLAIN (FORMAT JSON), enforces a 10000 plan cost circuit breaker, runs single extended-query statements, and probes LIMIT + 1 truncation.
Boundary B5 renders row-grounded summaries, checks custom summary tokens against returned rows and *_cents columns, redacts summary and rows fail-closed on blocked_provenance, attaches zero-match and truncation caveats, and withholds output if audit logging fails.
04Lesson
Why prompt-only text-to-SQL fails silently
Synthetic data. Simulated services. Every table, tenant account, financial total, and audit trail in this guide belongs to Example Dockside Cold-Freight Operations Platform (sql-gov.example-ops.test, tenants tnt_alderbay_test, tnt_cinderport_test, and tnt_kelpridge_test).
Most text-to-SQL prototypes paste table schemas into a system prompt, request SQL, and run a regular expression looking for DROP TABLE. That breaks along three independent axes: prompt rules cannot isolate tenants when connections run as table owner, regex filters miss PostgreSQL data-modifying CTEs and stacked RESET ROLE commands, and flat joins across 1:N and 1:M child tables silently multiply Q4 revenue by 3.225x ($25,800.00 vs $8,000.00) with zero SQL errors.
PostgreSQL 19 containment and the set_config() trap
Boundary B1 enforces tenant containment directly inside PostgreSQL 19.0: validate caller.tenant_id on a strict host allowlist before opening a transaction, provision analytics_reader with NOSUPERUSER and NOBYPASSRLS, grant SELECT only on work_orders, line_charges, and dispatch_inspections, and run both ENABLE and FORCE ROW LEVEL SECURITY bound to current_setting('app.tenant_id', true).
Live verification against PostgreSQL 19.0 exposed a critical bypass: even inside SET TRANSACTION READ ONLY as an unprivileged NOBYPASSRLS role, PUBLIC retains EXECUTE on pg_catalog.set_config(text, text, boolean). An inline SELECT calling set_config('app.tenant_id', 'tnt_cinderport_test', true) overwrote tenant context mid-transaction until we added REVOKE EXECUTE ON FUNCTION pg_catalog.set_config(text, text, boolean) FROM PUBLIC and REVOKE CREATE ON SCHEMA public FROM PUBLIC.
CREATE ROLE analytics_reader NOSUPERUSER NOCREATEDB NOCREATEROLE NOBYPASSRLS;REVOKE EXECUTE ON FUNCTION pg_catalog.set_config(text, text, boolean) FROM PUBLIC;REVOKE CREATE ON SCHEMA public FROM PUBLIC;REVOKE ALL ON ALL TABLES IN SCHEMA public FROM PUBLIC;GRANT SELECT ON work_orders, line_charges, dispatch_inspections TO analytics_reader;ALTER TABLE work_orders ENABLE ROW LEVEL SECURITY;ALTER TABLE work_orders FORCE ROW LEVEL SECURITY;Extended description
Phase 1 shows E-09 cross-tenant SQLi (OR 1=1, explicit columns with LIMIT 50) passing the AST syntax gate and being filtered strictly to tnt_alderbay_test by PostgreSQL FORCE RLS.
Phase 2 shows E-08 inline set_config() blocked independently by AST DISALLOWED_FUNCTION and PostgreSQL REVOKE EXECUTE (SQLSTATE 42501).
Phase 3 shows E-04 data-modifying CTE DELETE blocked by AST DATA_MODIFYING_CTE and PostgreSQL SET TRANSACTION READ ONLY (SQLSTATE 25006) while logging every attempt.

Extended description
Maps E-09 OR 1=1, E-06/07 restricted tables (UNION and subquery), E-05 stacked RESET ROLE, E-04 CTE DELETE, E-08 inline set_config, E-10..12 pg_catalog/information_schema/pg_sleep, E-15/16 join fan-out and missing filters, and H-11 Sonnet native refusal.
Includes pool-reuse isolation after transaction rollback and fail-closed AUDIT_WRITE_FAILED enforcement.
Dispositional Claude 5.5 outputs and native refusal handling
Forcing SQL on every turn makes models hallucinate when a business term is ambiguous, out of scope, or unauthorized. Boundary B2 constrains Claude 5.5 through output_config.format to four dispositions: executable_query, clarify_ambiguous_term, abstain_out_of_scope, and abstain_unauthorized. Non-executable turns carry sql: null and never touch PostgreSQL.

Extended description
Column 1 shows the four dispositional outcomes plus Claude 5.5 wire constraints (omit temperature and schema minimum).
Column 2 pairs the pure-JS SQL AST allowlist with PostgreSQL 19.0 engine defense.
Column 3 shows host-verified metadata, numeric-to-row verification, caveat guards, and allow-and-deny fail-closed audit logging.
Eliminating 3.225x 1:N x 1:M join fan-out in the AST gate
Joining work_orders directly to both line_charges (1:N) and dispatch_inspections (1:M) in a single SELECT produces a Cartesian product per order. On tenant tnt_alderbay_test for Q4 2026 USD posted orders, PostgreSQL silently returned 2,580,000 cents ($25,800.00) and 36 inspections instead of the true 800,000 cents ($8,000.00) and 18 inspections. Pre-aggregating each child table by order_id in separate CTEs turns both joins into 1:1 lookups with zero cent drift.

Extended description
Left panel shows the blocked flat join (JOIN_FANOUT_BLOCKED): PDX-02 780,000 cents / 14 insp and SEA-01 1,800,000 cents / 22 insp, totaling 2,580,000 cents and 36 inspections.
Right panel shows the governed two-CTE query (oc and oi grouped by order_id): PDX-02 320,000 cents / 7 insp and SEA-01 480,000 cents / 11 insp, totaling 800,000 cents and 18 inspections.
Extended description
Phase 1 highlights the naive flat join inflating Q4 revenue to $25,800.00 (2,580,000 cents, 36 inspections) before JOIN_FANOUT_BLOCKED intercepts it.
Phase 2 highlights the two-CTE pre-aggregation returning exact $8,000.00 (800,000 cents, 18 inspections) with numeric-to-row provenance verified.
Provenance verification, fail-closed audit, and live scorecard
Boundary B5 packages every response under gov-sql-contract/1: host-verified execution metadata stays separate from model assumptions, server-rendered summaries and custom summary overrides are gated against executed rows and *_cents columns (redacting summary and rows fail-closed on blocked_provenance), LIMIT + 1 lookahead flags truncation (H-05), COALESCE distinguishes zero aggregates from NULL (H-06), and missing or failing audit sinks withhold output fail-closed.

Extended description
Haiku 5.5 primary held-out (36 runs): 0 S1 breaches, 18/18 executable, 18/18 non-executable, 12/12 questions passing 3/3 runs, $0.00062 median cost, $0.0230 batch cost.
Sonnet 5.5 portability (12 runs, separate N=6): 0 S1 breaches, 6/6 executable, 6/6 non-executable, $0.1089 batch cost, H-11 native refusal mapped fail-closed.
Combined persisted live spend across 65 calls: $0.1469 ($0.00000000 Decimal drift); estimated grand total including aborted first Sonnet attempt at H-11: $0.2490.
| Evaluation Arm | Runs | S1 Breaches | Q1 Exec | Q2 Non-Exec | Batch USD |
|---|---|---|---|---|---|
| Uncontained starter (offline) | Baseline | Leaks rows | 0% (3.225x) | 0% | $0.0000 |
| Dev calibration (Haiku 5.5) | 8 (1x8) | 0 | 4/4 (100%) | 4/4 (100%) | $0.0047 |
| Held-out primary (Haiku 5.5) | 36 (3x12) | 0 | 18/18 (100%) | 18/18 (100%) | $0.0230 |
| Portability (Sonnet 5.5, separate) | 12 (1x12) | 0 | 6/6 (100%) | 6/6 (100%) | $0.1089 |
05Hands-on lab
Lab 1: PostgreSQL 19 containment and SQL AST allowlist
Provision analytics_reader (NOBYPASSRLS), revoke pg_catalog.set_config, force RLS, validate host tenants fail-closed, and replace the regex blocklist with pgsql-ast-parser.
Acceptance checks
- analytics_reader is non-superuser with NOBYPASSRLS and FORCE RLS on all 3 analytical tables
- OR 1=1 returns strictly caller tenant rows; restricted tables, CTE writes, and inline set_config fail with SQLSTATE 42501/25006
- Invalid tenant_id fails closed and Tenant A rollback never bleeds onto Tenant B on the same connection
- AST allowlist blocks E-01..E-14 structural, schema, function, and LIMIT attacks
Reproduce restricted-table leak, then verify AST + RLS block
$ node src/cli.ts ask --starter-flaws --question "List salaries from internal_staff_comp."Initial: Initial (starter-baseline)
{ "policy_verdict": "allowed", "leaked_rows": 4, "sample_row": { "staff_id": "STF-001", "role_title": "Cold-Chain Director", "base_salary_cents": 19200000 } }Final: Final (checkpoint-a)
{ "policy_verdict": "blocked_ast", "block_reason_codes": [ "DISALLOWED_RELATION" ], "rows": [] }Show the solution discussion
Apply checkpoint-a via node ../apply-checkpoint.mjs checkpoint-a .
Run node --test test/lab1-containment.test.ts and verify 6/6 tests pass offline.
More labs in this guide
Lab 2: Dispositional outputs and eliminating 3.225x join fan-out
Lock down the four-way dispositional wire schema in Zod, block flat 1:N x 1:M child joins in the AST gate, and enforce canonical posted/voided/sandbox/currency filters.
Lab 3: Numeric provenance, fail-closed audit, and offline replay eval
Redact unverified summary overrides, detect LIMIT + 1 truncation, attach zero-match caveats, fail closed on missing or failing audit sinks, and replay frozen Claude 5.5 evaluations offline.
06Failure gallery
Ten ways this breaks, and how you will know
Seven of these reproduce in the lab; the other three were observed in this guide's recorded runs. Learn the symptom first; it is what you will actually see.
- F-01
--starter-flawsReproduciblePrompt-only tenant isolation bypassed by OR 1=1
- Symptom
- Caller retrieves rows belonging to other tenants when SQL carries OR 1=1 or omits tenant_id.
- Diagnosis
- App executes generated SQL as table owner or superuser while relying on prompt wording for tenant scoping.
- Fix
- Run as analytics_reader (NOSUPERUSER NOBYPASSRLS), enable and FORCE ROW LEVEL SECURITY on every tenant table, and allowlist caller tenant_id on host.
- Verify
- node --test test/lab1-containment.test.ts
- F-02Reproducible
Regex DROP blocklist bypassed by data-modifying CTE or stacked SQL
- Symptom
- WITH d AS (DELETE FROM work_orders RETURNING order_id) SELECT * FROM d slips past regex checks.
- Diagnosis
- Regular expressions cannot parse SQL syntax trees, CTE side effects, or multi-statement payloads.
- Fix
- Enforce SET TRANSACTION READ ONLY, execute single extended-query calls, and validate through pgsql-ast-parser allowlists.
- Verify
- node --test test/lab1-containment.test.ts
- F-03Reproducible
Inline pg_catalog.set_config() RLS bypass inside READ ONLY
- Symptom
- A read-only SELECT calling set_config('app.tenant_id', 'tnt_cinderport_test', true) reads another tenant's rows.
- Diagnosis
- PostgreSQL grants EXECUTE on pg_catalog.set_config(text, text, boolean) to PUBLIC by default.
- Fix
- Run REVOKE EXECUTE ON FUNCTION pg_catalog.set_config(text, text, boolean) FROM PUBLIC in DDL and reject set_config in the AST function allowlist.
- Verify
- node --test test/lab1-containment.test.ts
- F-04Observed
Lab SET LOCAL ROLE copied directly into production connection pool
- Symptom
- Production application process holds superuser credentials capable of bypassing RLS on misconfiguration.
- Diagnosis
- Single-user PGlite lab topology was deployed verbatim into multi-user production PostgreSQL.
- Fix
- Connect the production analytics pool directly as unprivileged analytics_reader with no superuser credentials in the app.
- Verify
- SELECT rolsuper, rolbypassrls FROM pg_roles WHERE rolname = 'analytics_reader';
- F-05Observed
Claude 5.5 HTTP 400 from temperature or JSON Schema minimum
- Symptom
- Live planner calls fail with HTTP 400 invalid_request_error before planning starts.
- Diagnosis
- Claude 5.5 rejects legacy temperature parameters and numeric range keywords inside output_config.format.schema.
- Fix
- Omit temperature, tune reasoning via output_config.effort, and enforce integer bounds in Zod after parsing.
- Verify
- node --test test/lab2-semantics.test.ts
- F-06Observed
Unhandled native stop_reason='refusal' crashing JSON.parse
- Symptom
- Adversarial prompt H-11 on claude-sonnet-5-5 returns stop_reason='refusal' with 0 output tokens and aborts the handler.
- Diagnosis
- Consumer assumed output_config.format always emits schema JSON even on Anthropic safety refusals.
- Fix
- Inspect response.stop_reason first: map refusal fail-closed to abstain_unauthorized (sql: null) and abort fail-closed on max_tokens.
- Verify
- node src/cli.ts eval --set heldout --replay --model claude-sonnet-5-5
- F-07
--starter-flawsReproducibleSilent 3.225x 1:N x 1:M join fan-out inflation
- Symptom
- Q4 USD revenue reports 2,580,000 cents and 36 inspections instead of 800,000 cents and 18 inspections.
- Diagnosis
- Flat join combines work_orders with both line_charges (1:N) and dispatch_inspections (1:M) in one SELECT block.
- Fix
- Reject sibling child joins in ast-gate.ts (JOIN_FANOUT_BLOCKED) and pre-aggregate each child by order_id in separate CTEs.
- Verify
- node --test test/lab2-semantics.test.ts
- F-08Reproducible
Missing voided, sandbox, status, or currency predicates
- Symptom
- Voided orders, sandbox test entries, draft rows, or mixed USD and CAD amounts skew revenue totals.
- Diagnosis
- Raw SUM(amount_cents) omits canonical metric filters defined in the semantic catalog.
- Fix
- Require voided_at IS NULL, is_sandbox_order = false, status = 'posted', and currency scoping in the AST gate; clarify mixed-currency asks.
- Verify
- node --test test/lab2-semantics.test.ts
- F-09Reproducible
Fabricated summary numbers, hidden LIMIT truncation, or NULL aggregates
- Symptom
- Summary cites 999900 cents absent from rows, hides truncated LIMIT 3 output, or prints NULL for zero matching orders.
- Diagnosis
- Pipeline releases unverified text without numeric provenance checks, lookahead probes, or COALESCE.
- Fix
- Block unverified numbers (blocked_provenance), run a LIMIT + 1 lookahead probe inside the transaction, and wrap aggregates in COALESCE(..., 0).
- Verify
- node --test test/lab3-provenance.test.ts
- F-10Reproducible
Allow-only logging or fail-open audit sink
- Symptom
- Blocked attacks vanish from logs or sensitive rows still return when audit log writes fail.
- Diagnosis
- Application logs only allowed queries or catches and ignores audit write exceptions.
- Fix
- Write structured allow-and-deny audit records before returning data and fail closed with AUDIT_WRITE_FAILED on sink errors.
- Verify
- node --test test/lab3-provenance.test.ts
07Assessment
Transfer task and rubric
Design PostgreSQL RLS governance, AST allowlists, anti-fan-out CTEs, escalation repair, fail-closed provenance, and a frozen evaluation memo for an unseen multi-district utility schema.
| Criterion | 0 · Emerging | 1 · Developing | 2 · Proficient | 3 · Exemplary |
|---|---|---|---|---|
| R1: PostgreSQL Role, REVOKE set_config, & FORCE RLS (Critical) | Runs as superuser or relies on prompt filtering without engine RLS. | Enables RLS on some tables but omits FORCE RLS, REVOKE set_config, or READ ONLY. | Provisions NOBYPASSRLS role, revokes set_config and schema CREATE, applies FORCE RLS across all analytical tables, and sets READ ONLY with timeouts. | Proficient, and separates single-user local SET LOCAL ROLE testing from direct unprivileged role binding on production connection pools. |
| R2: Dispositional Schema, AST Allowlist, & stop_reason (Critical) | Uses regex DROP blocklists and forces SQL on every turn. | Parses AST partially or misses fail-closed stop_reason refusal and max_tokens handling. | Enforces four dispositions with additionalProperties: false, strict SQL AST allowlist, LIMIT <= 200, and fail-closed refusal mapping to sql: null. | Proficient, and enforces Claude 5.5 wire constraints (omitting temperature and unsupported schema bounds) with audit emission on native refusals. |
| R3: Curated Semantic Catalog & Prohibited Boundaries | Exposes raw DDL without metric grain, canonical filters, or restricted-table exclusions. | Names metrics but omits soft-delete/test filters or explicit prohibited tables. | Documents canonical metrics, parent grain, required active/non-deleted/non-test/unit predicates, and prohibited restricted tables. | Proficient, and pairs each metric with approved join paths and explicit mixed-unit ambiguity triggers. |
| R4: Join-Fan-Out Diagnosis & Two-CTE Repair | Leaves flat sibling child joins unaddressed or relies on SELECT DISTINCT. | Diagnoses fan-out in prose but leaves child tables unaggregated before joining. | Diagnoses 1:N x 1:M Cartesian inflation and repairs with two pre-aggregated CTEs grouped by parent key. | Proficient, and preserves zero-activity parents via LEFT JOIN with COALESCE(..., 0) and explicit integer casts. |
| R5: Soft-Delete, Unit Clarification, & Escalation Trace Repair | Counts soft-deleted/test rows, sums mixed units, or blames only the prompt for escalation. | Fixes either soft-delete/unit filters or set_config escalation while leaving the other incomplete. | Applies canonical active/non-deleted/non-test/unit filters, clarifies mixed-unit asks with sql: null, and repairs set_config under READ ONLY with AST + REVOKE fixes. | Proficient, and explains how FORCE RLS independently neutralizes OR 1=1 predicates on syntactically valid SELECT statements. |
| R6: Query-to-Evidence Provenance & Fail-Closed Audit (Critical) | Returns unverified prose numbers and logs only successful queries. | Checks numbers partially or fails open when audit logging errors. | Separates host metadata from model notes, blocks unverified summary figures, flags LIMIT truncation and zero-match caveats, and logs allow/deny fail-closed. | Proficient, and binds every audit record to sql_sha256, applied scope, role, and policy_verdict with zero raw secrets logged. |
| R7: Frozen Scorecard, S1 Go/Hold, Coverage Memo, & Residual Risks | Reports ad-hoc happy-path demos or equates 100% schema visibility with accuracy. | Proposes a scorecard or note without pre-freeze hashes, quantitative thresholds, or residual risks. | Defines pre-frozen manifest rules, S1 = 0 / Q1..Q3 ship-or-hold gates, a coverage-vs-accuracy memo, and at least three concrete residual risks. | Proficient, and pairs every residual risk with an operational mitigation and monitoring alert. |
Proficiency standard: Proficient or higher on every criterion. Proposed local standard, not an official certification.
The full brief
Target domain is an unseen multi-district telemetry database with three analytical tables (parent accounts plus two 1:N and 1:M child tables) and two restricted credential and identity tables.
Part 1: Deliver PostgreSQL DDL enforcing a least-privilege NOBYPASSRLS role, FORCE RLS, REVOKE EXECUTE on set_config, READ ONLY transactions, a four-way dispositional output contract with AST allowlist and stop_reason refusal handling, and a curated semantic catalog.
Part 2: Diagnose and repair a 1:N by 1:M join fan-out query (Q4 billed gallons plus present-time unresolved alerts on active gallon accounts), soft-delete, test-row and mixed-unit traps, and a cross-district set_config escalation trace.
Part 3: Deliver fail-closed numeric provenance and audit controls, a pre-frozen evaluation scorecard with critical safety go or hold gates, a schema-coverage-versus-accuracy memo, and a residual-risk audit (screened structurally and graded by a human reviewer).
08Instructor kit
Teach it to a room
3-hour facilitation run-of-show
Timed 6-block schedule covering baseline leak reproduction, Labs 1 through 3 checkpoints, misconception debriefs, and assessment handoff.
Checkpoint recovery script & 12-mutant check
apply-checkpoint.mjs moves any stalled learner to starter-baseline, checkpoint-a, checkpoint-b, or final; lab-solutions-check.sh verifies 12/12 mutants offline.
Measured author clean-room walk
Initial online pnpm install fetched in 1.04s into an empty store, followed by full offline checkpoint, replay, and mutant verification (154.8s) inside unshare -rn.
8-criterion instructor clearance rubric
Requires live demonstration of set_config bypass defense, AST debugging, 3.225x fan-out CTEs, refusal triage, calibration scoring across four submissions, and human rubric review.
Honest dual-denominator pass-rate template
Reports both submitted and enrolled denominators plus critical S1 auto-fails; kept blank until a real observed cohort runs.
10Sources and verification
- [1]How we contain Claude · anthropic.comchecked Dec 1, 2026
- [2]Structured outputs · platform.claude.comchecked Dec 1, 2026
- [3]Handling stop reasons · platform.claude.comchecked Dec 1, 2026
- [4]Effort parameter · platform.claude.comchecked Dec 1, 2026
- [5]Claude 5.5 migration guide · platform.claude.comchecked Dec 1, 2026
- [6]Claude pricing · platform.claude.comchecked Dec 1, 2026
- [7]PostgreSQL Row Security Policies · postgresql.orgchecked Dec 1, 2026
- [8]PostgreSQL Role Attributes · postgresql.orgchecked Dec 1, 2026
- [9]PostgreSQL SET TRANSACTION · postgresql.orgchecked Dec 1, 2026
- [10]PostgreSQL GRANT · postgresql.orgchecked Dec 1, 2026
- [11]PostgreSQL EXPLAIN · postgresql.orgchecked Dec 1, 2026
- [12]OWASP Database Security Cheat Sheet · cheatsheetseries.owasp.orgchecked Dec 1, 2026
- [13]OWASP SQL Injection Prevention Cheat Sheet · cheatsheetseries.owasp.orgchecked Dec 1, 2026
- [14]PGlite: Postgres in WebAssembly · github.comchecked Dec 1, 2026
- [15]BIRD-SQL: Can LLM Already Serve as A Database Interface? · arxiv.orgchecked Dec 1, 2026
- [16]Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows · arxiv.orgchecked Dec 1, 2026
- [17]TrustSQL: A Reliability Benchmark for Text-to-SQL Models with Diverse Unanswerable Questions · arxiv.orgchecked Dec 1, 2026
- [18]Rethinking Text-to-SQL Evaluation Pitfalls · arxiv.orgchecked Dec 1, 2026
Independent work. Not affiliated with or endorsed by any vendor named in this guide.




