From: Bo Peng Date: Sun, 5 Oct 2025 10:35:14 +0000 (+0900) Subject: Fix regression introduced by the previous commit (df277163720a248f108192329de58077cd3... X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/config.php?a=commitdiff_plain;h=020ee7084741d207307aae6f8b95a9ccdbaeb818;p=pgpool2.git Fix regression introduced by the previous commit (df277163720a248f108192329de58077cd35ea4e), which caused a syntax error in "PGPOOL SET CACHE DELETE". --- diff --git a/src/parser/gram.y b/src/parser/gram.y index b6a4f618f..8052ced8d 100644 --- a/src/parser/gram.y +++ b/src/parser/gram.y @@ -1650,6 +1650,13 @@ VariableSetStmt: n->is_local = false; $$ = (Node *) n; } + | PGPOOL set_rest_more + { + VariableSetStmt *n = $2; + n->type = T_PgpoolQueryCacheStmt; /* Hack to keep changes minimum */ + n->is_local = false; + $$ = (Node *) n; + } | SET set_rest { VariableSetStmt *n = $2; @@ -1848,6 +1855,13 @@ set_rest_more: /* Generic SET syntaxes: */ n->location = @3; $$ = n; } + /* PGPOOL CACHE DELETE */ + | SET CACHE DELETE_P Sconst + { + VariableSetStmt *n = makeNode(VariableSetStmt); + n->name = $4; /* query to delete query cache */ + $$ = n; + } ; var_name: ColId { $$ = $1; } diff --git a/src/parser/gram_minimal.y b/src/parser/gram_minimal.y index 5c71b4cae..dc540e1c9 100644 --- a/src/parser/gram_minimal.y +++ b/src/parser/gram_minimal.y @@ -1652,6 +1652,13 @@ VariableSetStmt: n->is_local = false; $$ = (Node *) n; } + | PGPOOL set_rest_more + { + VariableSetStmt *n = $2; + n->type = T_PgpoolQueryCacheStmt; /* Hack to keep changes minimum */ + n->is_local = false; + $$ = (Node *) n; + } | SET set_rest { VariableSetStmt *n = $2; @@ -1850,6 +1857,13 @@ set_rest_more: /* Generic SET syntaxes: */ n->location = @3; $$ = n; } + /* PGPOOL CACHE DELETE */ + | SET CACHE DELETE_P Sconst + { + VariableSetStmt *n = makeNode(VariableSetStmt); + n->name = $4; /* query to delete query cache */ + $$ = n; + } ; var_name: ColId { $$ = $1; } diff --git a/src/parser/gram_template.y b/src/parser/gram_template.y index 94017e3cb..4ade68365 100644 --- a/src/parser/gram_template.y +++ b/src/parser/gram_template.y @@ -1673,6 +1673,13 @@ VariableSetStmt: n->is_local = false; $$ = (Node *) n; } + | PGPOOL set_rest_more + { + VariableSetStmt *n = $2; + n->type = T_PgpoolQueryCacheStmt; /* Hack to keep changes minimum */ + n->is_local = false; + $$ = (Node *) n; + } | SET set_rest { VariableSetStmt *n = $2; @@ -1871,6 +1878,13 @@ set_rest_more: /* Generic SET syntaxes: */ n->location = @3; $$ = n; } + /* PGPOOL CACHE DELETE */ + | SET CACHE DELETE_P Sconst + { + VariableSetStmt *n = makeNode(VariableSetStmt); + n->name = $4; /* query to delete query cache */ + $$ = n; + } ; var_name: ColId { $$ = $1; }