Krikri::PluginHelpers::SqlQuoting::SQLParseError
matches community.postgresql's pg_quote_identifier which itself wraps Ansible's shared _identifier_parse. It takes the raw user-supplied identifier text and returns SQL text:
- an unquoted identifier (or dotted path) has every fragment wrapped in double quotes, embedded quotes doubled;
- a dotted unquoted path is split at the dots and each fragment quoted separately ("a.b" -> '"a"."b"');
- already-quoted input passes through unchanged (the caller is trusted to have escaped it, exactly as the Python does);
- a leading/trailing/unpaired quote, an empty identifier and an over-deep dotted path all raise SQLParseError with the Python originals' exact messages. The id_type controls how many dot levels the identifier may carry (a column can be db.schema.table.column, a role only ever one name), mirroring _PG_IDENTIFIER_TO_DOT_LEVEL. Every fragment comes back double-quoted, so arbitrary identifier text (quotes, semicolons, dashes, spaces, unicode, backslashes) cannot break out of the quoting - injection-safe by construction, unlike a character allow-list.