0008-Fix-RPR-documentation-correct-depth-limit-and-EXPLAI.txt
text/plain
Filename: 0008-Fix-RPR-documentation-correct-depth-limit-and-EXPLAI.txt
Type: text/plain
Part: 7
Message:
Re: Row pattern recognition
From 5b47d3a2a88f7a62f5a4c6662c4a1b8e03e5348e Mon Sep 17 00:00:00 2001
From: Henson Choi <assam258@gmail.com>
Date: Sat, 14 Feb 2026 23:56:15 +0900
Subject: [PATCH 8/8] Fix RPR documentation: correct depth limit and EXPLAIN
marker examples
---
doc/src/sgml/advanced.sgml | 9 +++++----
doc/src/sgml/ref/select.sgml | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/advanced.sgml b/doc/src/sgml/advanced.sgml
index 241c7e03a5a..a76fb263a94 100644
--- a/doc/src/sgml/advanced.sgml
+++ b/doc/src/sgml/advanced.sgml
@@ -647,7 +647,7 @@ FROM stock
and simplifying nested quantifiers
(e.g., <literal>(A*)*</literal> becomes <literal>A*</literal>).
These optimizations reduce pattern complexity and also decrease
- nesting depth, making the 255-level depth limit rarely encountered.
+ nesting depth, making the 253-level depth limit rarely encountered.
They are applied transparently and can be observed
in <command>EXPLAIN</command> output.
</para>
@@ -667,9 +667,10 @@ FROM stock
markers that indicate optimization opportunities. A double quote
<literal>"</literal> marks where pattern absorption can occur,
and a single quote <literal>'</literal> marks absorbable elements
- within a branch. For example, <literal>A+"</literal> indicates that
- repeated matches of A can be absorbed, while <literal>(A' B')+"</literal>
- shows that both A and B within the group are absorbable.
+ within a branch. For example, <literal>a+"</literal> indicates that
+ repeated matches of <literal>a</literal> can be absorbed, while
+ <literal>(a' b')+"</literal> shows that both <literal>a</literal>
+ and <literal>b</literal> within the group are absorbable.
These markers are primarily useful for understanding internal
optimization behavior.
</para>
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index 7ec7760f472..f0676bf6f2c 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -1155,7 +1155,7 @@ DEFINE <replaceable class="parameter">definition_variable_name</replaceable> AS
used in <literal>PATTERN</literal> clause is 251.
If this limit is exceeded, an error will be raised.
Additionally, the maximum nesting depth of pattern groups
- (parentheses) is 255 levels.
+ (parentheses) is 253 levels.
However, pattern optimizations such as flattening nested sequences
and simplifying nested quantifiers may reduce the effective depth,
so this limit is rarely reached in practice.
--
2.50.1 (Apple Git-155)