From 66cf7831331c90cef6702300241d1880276fcb2a Mon Sep 17 00:00:00 2001 From: Henson Choi Date: Mon, 31 Aug 2026 15:13:02 +0900 Subject: [PATCH] Correct two errors in the row pattern recognition documentation row_pattern_common_syntax was listed inside the frame_clause synopsis, on both of its forms. The grammar puts opt_row_pattern_common_syntax beside opt_frame_clause in window_specification rather than within it, so it belongs in the window_definition synopsis, which did not mention it at all. The note on the 240 pattern variable limit added that exceeding it raises an error. The nesting depth limit named in the next sentence raises one too and does not say so, and a reader who notices the difference is invited to conclude something untrue. --- doc/src/sgml/ref/select.sgml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index e595bf5d1ac..15def1cfdcb 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -972,6 +972,7 @@ WINDOW window_name AS ( expression [, ...] ] [ ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] ] [ frame_clause ] +[ row_pattern_common_syntax ] @@ -1014,8 +1015,8 @@ WINDOW window_name AS ( frame_clause can be one of -{ RANGE | ROWS | GROUPS } frame_start [ frame_exclusion ] [ row_pattern_common_syntax ] -{ RANGE | ROWS | GROUPS } BETWEEN frame_start AND frame_end [ frame_exclusion ] [ row_pattern_common_syntax ] +{ RANGE | ROWS | GROUPS } frame_start [ frame_exclusion ] +{ RANGE | ROWS | GROUPS } BETWEEN frame_start AND frame_end [ frame_exclusion ] where frame_start @@ -1210,7 +1211,6 @@ DEFINE definition_variable_name AS Note that the maximum number of unique pattern variables used in the PATTERN clause is 240. - If this limit is exceeded, an error will be raised. Additionally, the maximum nesting depth of pattern groups (parentheses) is 254 levels. An alternation costs a level of its own, so a pattern that nests alternations reaches the limit at about half