From a6be0600ac3b71dda8277ab0fcbe59ee101ac1ce Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Sat, 16 Dec 2023 18:20:03 +0100 Subject: [PATCH] Remove useless LIMIT_OPTION_DEFAULT value from LimitOption During the development that led to commit 357889eb17bb, for a time we had the value LIMIT_OPTION_DEFAULT, which was mostly but not completely removed later on, before commit. Complete the removal now. Author: Zhang Mingli Discussion: https://postgr.es/m/59d61a1a-3858-475a-964f-24468c97cc67@Spark --- src/backend/parser/gram.y | 2 +- src/include/nodes/nodes.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index f16bbd3cdd..63f172e175 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -18461,7 +18461,7 @@ insertSelectOptions(SelectStmt *stmt, parser_errposition(exprLocation(limitClause->limitCount)))); stmt->limitCount = limitClause->limitCount; } - if (limitClause && limitClause->limitOption != LIMIT_OPTION_DEFAULT) + if (limitClause) { if (stmt->limitOption) ereport(ERROR, diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 4c32682e4c..a178d08727 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -440,7 +440,6 @@ typedef enum LimitOption { LIMIT_OPTION_COUNT, /* FETCH FIRST... ONLY */ LIMIT_OPTION_WITH_TIES, /* FETCH FIRST... WITH TIES */ - LIMIT_OPTION_DEFAULT, /* No limit present */ } LimitOption; #endif /* NODES_H */