final class Identifiers
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Decodes the spelling of a PostgreSQL identifier token into the name the server uses.

Rule: PG-IDENT-001. Scope: the IDENT terminal (plain, "quoted" and U&"..." with an optional UESCAPE clause, which the lexer delivers as one token) and every keyword terminal used as a name. An unquoted identifier and a keyword are folded to lower case, ASCII letters only, as the server does for a multibyte server encoding. A quoted identifier is taken literally with each doubled quote read as one quote. A Unicode identifier has its escapes replaced after the quotes are undoubled. Every name is then cut to 63 bytes on a character boundary (NAMEDATALEN - 1), because the server stores no longer identifier. Invalid Unicode escapes are lexical errors of the server and are reported as SQL outside the grammar. Source: https://www.postgresql.org/docs/17/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS. Status: Implemented.

Constants§

public const LIMIT = 63

The longest name the server keeps, in bytes.

Methods§

public function decode(string $text): string

Test cases 8§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 8

Relations§

Instantiated in 7
Method calls 7
Constant reads 2