From 3ad851525c0717b66be39cc0c5a66141bc55c133 Mon Sep 17 00:00:00 2001 From: Henson Choi Date: Sat, 25 Jul 2026 13:27:46 +0900 Subject: [PATCH] Fix gram.y comments to name the SQL keyword PATTERN These comments list SQL keywords, not bison tokens, so PATTERN_P should read PATTERN, just as INITIAL is already spelled without _P. --- src/backend/parser/gram.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index f6de8d13384..0cde1b5b99e 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -922,7 +922,7 @@ static const char *rpr_invalid_quantifier_token(const char *tok); * keywords that lack a natural precedence level. * * We need to do this for PARTITION, RANGE, ROWS, GROUPS, AFTER, INITIAL, - * SEEK, PATTERN_P to support opt_existing_window_name (see comment there). + * SEEK, PATTERN to support opt_existing_window_name (see comment there). * * The frame_bound productions UNBOUNDED PRECEDING and UNBOUNDED FOLLOWING * are even messier: since UNBOUNDED is an unreserved keyword (per spec!), @@ -17470,7 +17470,7 @@ window_specification: '(' opt_existing_window_name opt_partition_clause ; /* - * If we see PARTITION, RANGE, ROWS, GROUPS, AFTER, INITIAL, SEEK or PATTERN_P + * If we see PARTITION, RANGE, ROWS, GROUPS, AFTER, INITIAL, SEEK or PATTERN * as the first token after the '(' of a window_specification, we want the * assumption to be that there is no existing_window_name; but those keywords * are unreserved and so could be ColIds. We fix this by making them have the -- 2.50.1 (Apple Git-155)