final class ObjectIdentifiers
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

Checks the numbers of GRANT and REVOKE ON LARGE OBJECT as object identifiers.

Rule: PG-LARGE-OBJECT-OID-001. The server reads each number with oidparse(): an integer constant, which fits int4, is taken as it is (a negative one wraps around); a numeric constant keeps its written text, and the text with its sign is read as an unsigned 32-bit integer by uint32in_subr(), which calls strtoul() with base 0. That reads decimal digits, hexadecimal digits after 0x and octal digits after a leading zero; any other text, such as a fraction, an exponent, digit separators or the 0o and 0b prefixes, is "invalid input syntax for type oid", and a value beyond 4294967295 is "value … is out of range for type oid"; of the negative values outside int4 only -2147483648 passes, because only it matches after sign extension. Whether a large object exists is not a declaration a context holds and is not reported. Termination: one pass over a finite list. Source: https://www.postgresql.org/docs/17/sql-grant.html, https://www.postgresql.org/docs/17/datatype-oid.html. Status: Implemented.

Methods§

public function check(Derivation $derivation, list<SignedNumber> $identifiers): void
public function unsigned(string $text): ?string

Answers the canonical decimal digits strtoul() with base 0 reads from a whole text, or null when it does not read the whole text.

Parameters

$textstring

Returns

?string
Test cases 2
Called from 1
Calls 5

Private surface 2§

Implementation details, listed for orientation only.

private const OID_MAX = '4294967295'
private const NEGATIVE_MAX = '2147483648'

Test cases 5§

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

Dedicated tests 5

Relations§

Instantiated in 1
Method calls 1