Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 020ee70

Browse files
committed
Fix regression introduced by the previous commit (df27716), which caused a syntax error in "PGPOOL SET CACHE DELETE".
1 parent df27716 commit 020ee70

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

src/parser/gram.y

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,6 +1650,13 @@ VariableSetStmt:
16501650
n->is_local = false;
16511651
$$ = (Node *) n;
16521652
}
1653+
| PGPOOL set_rest_more
1654+
{
1655+
VariableSetStmt *n = $2;
1656+
n->type = T_PgpoolQueryCacheStmt; /* Hack to keep changes minimum */
1657+
n->is_local = false;
1658+
$$ = (Node *) n;
1659+
}
16531660
| SET set_rest
16541661
{
16551662
VariableSetStmt *n = $2;
@@ -1848,6 +1855,13 @@ set_rest_more: /* Generic SET syntaxes: */
18481855
n->location = @3;
18491856
$$ = n;
18501857
}
1858+
/* PGPOOL CACHE DELETE */
1859+
| SET CACHE DELETE_P Sconst
1860+
{
1861+
VariableSetStmt *n = makeNode(VariableSetStmt);
1862+
n->name = $4; /* query to delete query cache */
1863+
$$ = n;
1864+
}
18511865
;
18521866

18531867
var_name: ColId { $$ = $1; }

src/parser/gram_minimal.y

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,6 +1652,13 @@ VariableSetStmt:
16521652
n->is_local = false;
16531653
$$ = (Node *) n;
16541654
}
1655+
| PGPOOL set_rest_more
1656+
{
1657+
VariableSetStmt *n = $2;
1658+
n->type = T_PgpoolQueryCacheStmt; /* Hack to keep changes minimum */
1659+
n->is_local = false;
1660+
$$ = (Node *) n;
1661+
}
16551662
| SET set_rest
16561663
{
16571664
VariableSetStmt *n = $2;
@@ -1850,6 +1857,13 @@ set_rest_more: /* Generic SET syntaxes: */
18501857
n->location = @3;
18511858
$$ = n;
18521859
}
1860+
/* PGPOOL CACHE DELETE */
1861+
| SET CACHE DELETE_P Sconst
1862+
{
1863+
VariableSetStmt *n = makeNode(VariableSetStmt);
1864+
n->name = $4; /* query to delete query cache */
1865+
$$ = n;
1866+
}
18531867
;
18541868

18551869
var_name: ColId { $$ = $1; }

src/parser/gram_template.y

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,13 @@ VariableSetStmt:
16731673
n->is_local = false;
16741674
$$ = (Node *) n;
16751675
}
1676+
| PGPOOL set_rest_more
1677+
{
1678+
VariableSetStmt *n = $2;
1679+
n->type = T_PgpoolQueryCacheStmt; /* Hack to keep changes minimum */
1680+
n->is_local = false;
1681+
$$ = (Node *) n;
1682+
}
16761683
| SET set_rest
16771684
{
16781685
VariableSetStmt *n = $2;
@@ -1871,6 +1878,13 @@ set_rest_more: /* Generic SET syntaxes: */
18711878
n->location = @3;
18721879
$$ = n;
18731880
}
1881+
/* PGPOOL CACHE DELETE */
1882+
| SET CACHE DELETE_P Sconst
1883+
{
1884+
VariableSetStmt *n = makeNode(VariableSetStmt);
1885+
n->name = $4; /* query to delete query cache */
1886+
$$ = n;
1887+
}
18741888
;
18751889

18761890
var_name: ColId { $$ = $1; }

0 commit comments

Comments
 (0)