From 5b47d3a2a88f7a62f5a4c6662c4a1b8e03e5348e Mon Sep 17 00:00:00 2001 From: Henson Choi 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., (A*)* becomes A*). 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 EXPLAIN output. @@ -667,9 +667,10 @@ FROM stock markers that indicate optimization opportunities. A double quote " marks where pattern absorption can occur, and a single quote ' marks absorbable elements - within a branch. For example, A+" indicates that - repeated matches of A can be absorbed, while (A' B')+" - shows that both A and B within the group are absorbable. + within a branch. For example, a+" indicates that + repeated matches of a can be absorbed, while + (a' b')+" shows that both a + and b within the group are absorbable. These markers are primarily useful for understanding internal optimization behavior. 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 definition_variable_name AS used in PATTERN 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)