Skip to main content

Module identifiers

Module identifiers 

Source

Functions§

is_safe_ident
True if name is a safe SQL identifier candidate (alphanumeric + underscore, non-empty, does not start with a digit). Loosely the same predicate as is_safe_unquoted minus the case sensitivity and reserved-word check — kept as a separate helper because it’s a generic “could this be a safe identifier” question used by filename validation.
is_safe_unquoted
True when name is safe to emit unquoted in SQL for the given dialect.
quote_ident
Quote a SQL identifier (table/column/schema) per database dialect, but only when quoting is syntactically required. Trivially-safe identifiers pass through untouched.
quote_ident_always
Always quote, regardless of safety. Doubles internal quote characters.
quote_qualified
Quote a qualified table reference (schema.table) per dialect, or the bare table when no schema is provided. Each part is conditionally quoted.