Skip to main content

Module validation

Module validation 

Source

Functionsยง

quote_ident
Quote a PostgreSQL identifier, escaping embedded double-quotes. Use this instead of duplicating format!("\"{}\"", s.replace('"', "\"\"")) in every module.
quote_identifier
validate_identifier
validate_privilege_list
Validate a privilege specification for GRANT/REVOKE. Accepts a comma-separated list of known privilege keywords (case-insensitive), e.g. "SELECT, INSERT" or "ALL PRIVILEGES". Rejects anything else so the value can be safely interpolated into the statement.