classWindowChecks
final class WindowChecks
Reports the window frames the ordering of their own window cannot support.
Rule: PG-WINDOW-CHECKS-001. A RANGE frame with an offset bound needs exactly one ORDER BY column, and a GROUPS frame needs an ORDER BY. A specification that refines an existing window may take its ordering from that window, which the WINDOW clause defines; such a specification is left to the clause. Source: https://www.postgresql.org/docs/17/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS, transformWindowDefinitions in src/backend/parser/parse_clause.c of PostgreSQL 17. Termination: constant work. Status: Implemented.
Methods§
public function specification(Derivation $derivation, WindowSpecification $window): voidReports a frame its specification's ordering cannot support.
Parameters
$derivation | Derivation | |
$window | WindowSpecification |
Test cases 3
Called from 1
Calls 7
- class-const FrameMode::Range() line 38
- function-call
countline 38 - method-call Derivation::report() line 39
- new WindowProblem line 39
- class-const WindowProblemKind::RangeOffsetOrder() line 39
- class-const FrameMode::Groups() line 41
- class-const WindowProblemKind::GroupsWithoutOrder() line 42
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.