Query rules
The query tool checks every statement before it reaches Postgres. Comments and quoted text are ignored during the check, so select 'a;b' is fine.
Allowed
Section titled “Allowed”- One statement per call
- Starts with
SELECT,WITH,EXPLAIN,SHOW,VALUESorTABLE
Rejected
Section titled “Rejected”| Rule | Example | Error |
|---|---|---|
| More than one statement | select 1; select 2 |
Only one statement per query is allowed |
| Not a read statement | delete from "Note" |
Only SELECT/WITH/EXPLAIN/SHOW queries are allowed |
| Transaction control or settings | ... commit ..., ... set ... |
Transaction control, SET and SELECT INTO are not allowed |
SELECT INTO |
select * into temp t from "Note" |
(same as above) |
| Excluded table named | select * from "AuditEvent" |
Queries on AuditEvent are not allowed |
The keywords commit, rollback, begin, set, reset, discard, lock and into are blocked anywhere outside quotes. A query that uses a column named set or lock must quote it ("set").
Enforced by Postgres
Section titled “Enforced by Postgres”Even if a statement passes the checks, it runs in a READ ONLY transaction, so data-modifying CTEs such as with d as (delete ...) select ... still fail.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Statement timeout | 15 seconds |
| Rows returned | 500 (rest truncated) |