Skip to main content

RESERVED_ROLE_SPECIFICATION_NAMES

Constant RESERVED_ROLE_SPECIFICATION_NAMES 

Source
const RESERVED_ROLE_SPECIFICATION_NAMES: [&str; 5];
Expand description

Role names that PostgreSQL reserves for role specifications in statements like GRANT ... TO CURRENT_USER and SET ROLE NONE. A role with such a name would be ambiguous there, so creating one is not allowed.

PostgreSQL rejects most of these at parse time, only when they appear as unquoted keywords. Our parser does not track whether an identifier was quoted, so we instead reject the names themselves. Only the lowercase spellings are reserved, which is what the unquoted forms normalize to, so quoted names like "CURRENT_USER" remain valid, as in PostgreSQL.