AUDIT.CATALOG.NOT_COMPARED — read completely, and outside a comparison on purpose
- Category: safety
- Level: 0
- Stability: stable
- Suites: audit
The audit reports this notice for an object it read completely and understood, which a rule nonetheless does not compare with something else. The boundary is part of how that rule is built, and the rule's page names it.
Where it comes from
Today it comes from the redundant-index rule, PG.L7.INDEX_REDUNDANT,
and its MySQL twin, in three shapes:
- A b-tree under a non-default operator class.
text_pattern_opsservesLIKE 'foo%'and the default class serves equality and ordering, while the server prints both key positions the same way. The index is compared against nothing. - A partial index on a table that carries another condition. A partial index is compared against the indexes under its own condition. Whether one condition implies another is not decided here, so the pair between two different conditions stays unjudged.
- A MySQL prefix-length key. It indexes the first bytes of a column, and no column list can say that.
A partial index alone under the only condition on its table, and a GIN index alone under its method and operator class, do not produce this notice. Each was compared against everything a comparison can mean.
Why it is not undetermined
An undetermined result is a check that wanted to run and could not, and --strict escalates it.
Nothing here wanted to run. Reporting these as undetermined turned every schema with an ordinary
partial index into a permanent red under the ci profile, which is why this notice has an id of its
own.
It reports as not_applicable, with the reason not_comparable. A pipeline can count it, filter it
or ignore it, and a strict run is not affected by it.
How it differs from AUDIT.CATALOG.UNREAD.NOT_UNDERSTOOD
That notice means part of the object did not arrive in a form a rule can reason about: an expression recorded beside an index rather than among its key positions, or a condition whose shape the reading does not recognize. It stays undetermined, because there the question really is unanswered.
What to do
Nothing is owed. There is no setting to change and no grant to make. If a pair that falls under one of these boundaries matters to you, compare it by hand: the notice names the index and the boundary.
Related
PG.L7.INDEX_REDUNDANT— the boundaries, one by oneAUDIT.CATALOG.UNREAD— when part of the catalog was not read at all- Understanding
undetermined