Expand description
What a guest’s statement is, judged by its leading keywords: whatever runs a guest’s SQL decides the same way how it may run.
Functions§
- changes_
session - Statements that change session state rather than the transaction’s:
SETother thanSET LOCAL,SET TRANSACTIONandSET CONSTRAINTS, andRESET. - controls_
transaction - Transaction control, which inside a host-managed transaction would end or split it behind the host’s back.
- requires_
autocommit - Statements Postgres refuses inside a transaction block, judged by their
leading keywords after any comments:
CREATE/DROP INDEX CONCURRENTLY,REINDEX … CONCURRENTLY,REINDEX DATABASE/SYSTEM,VACUUM,CREATE/DROP DATABASE,CREATE/DROP TABLESPACE,ALTER SYSTEM,CLUSTER,DISCARD ALL. - rows_
as_ json - A caller’s
SELECTwrapped to answer each row as JSON,limitrows at most. The SQL is wrapped, never concatenated onto another statement, and the newline after it keeps a query that ends in a--comment from swallowing the limit.