Skip to main content

is_read_only

Function is_read_only 

Source
pub fn is_read_only(setting: &str) -> bool
Expand description

True when setting (a Postgres transaction_read_only value, as read by SHOW transaction_read_only) marks the session as read-only. Anything other than "on" counts as writable: this matches libpq’s target_session_attrs=read-write on pre-14 servers, and an unexpected value shouldn’t take the service down.