Skip to main content

check_relation_token

Function check_relation_token 

Source
pub fn check_relation_token(raw_name: &str) -> Result<String>
Expand description

Resolve a raw relation token the same way [normalize_table_name] resolves a parsed one.

Handlers that read a relation out of a whitespace-split statement get the token before sqlparser sees it, so they need the rule in token form:

  • pg_catalog.pg_class → pg_class.
  • _system.audit_log → _system.audit_log.
  • Any other qualifier is rejected as schema-qualified.
  • An unqualified token decodes through check_identifier.

A token carrying a double quote is treated as one identifier, so a quoted name containing a dot never splits.