@@ -370,7 +370,7 @@ static void processCASbits(int cas_bits, int location, const char *constrType,
370370
371371%type <istmt> insert_rest
372372
373- %type <vsetstmt> set_rest SetResetClause
373+ %type <vsetstmt> set_rest set_rest_more SetResetClause FunctionSetResetClause
374374
375375%type <node> TableElement TypedTableElement ConstraintElem TableFuncElement
376376 ForeignTableElement
@@ -1227,7 +1227,27 @@ VariableSetStmt:
12271227 }
12281228 ;
12291229
1230- set_rest : /* Generic SET syntaxes: */
1230+ set_rest :
1231+ TRANSACTION transaction_mode_list
1232+ {
1233+ VariableSetStmt *n = makeNode(VariableSetStmt);
1234+ n->kind = VAR_SET_MULTI;
1235+ n->name = " TRANSACTION" ;
1236+ n->args = $2 ;
1237+ $$ = n;
1238+ }
1239+ | SESSION CHARACTERISTICS AS TRANSACTION transaction_mode_list
1240+ {
1241+ VariableSetStmt *n = makeNode(VariableSetStmt);
1242+ n->kind = VAR_SET_MULTI;
1243+ n->name = " SESSION CHARACTERISTICS" ;
1244+ n->args = $5 ;
1245+ $$ = n;
1246+ }
1247+ | set_rest_more
1248+ ;
1249+
1250+ set_rest_more : /* Generic SET syntaxes: */
12311251 var_name TO var_list
12321252 {
12331253 VariableSetStmt *n = makeNode(VariableSetStmt);
@@ -1277,22 +1297,6 @@ set_rest: /* Generic SET syntaxes: */
12771297 n->kind = VAR_SET_DEFAULT;
12781298 $$ = n;
12791299 }
1280- | TRANSACTION transaction_mode_list
1281- {
1282- VariableSetStmt *n = makeNode(VariableSetStmt);
1283- n->kind = VAR_SET_MULTI;
1284- n->name = " TRANSACTION" ;
1285- n->args = $2 ;
1286- $$ = n;
1287- }
1288- | SESSION CHARACTERISTICS AS TRANSACTION transaction_mode_list
1289- {
1290- VariableSetStmt *n = makeNode(VariableSetStmt);
1291- n->kind = VAR_SET_MULTI;
1292- n->name = " SESSION CHARACTERISTICS" ;
1293- n->args = $5 ;
1294- $$ = n;
1295- }
12961300 | CATALOG_P Sconst
12971301 {
12981302 ereport (ERROR,
@@ -1512,6 +1516,12 @@ SetResetClause:
15121516 | VariableResetStmt { $$ = (VariableSetStmt *) $1 ; }
15131517 ;
15141518
1519+ /* SetResetClause allows SET or RESET without LOCAL */
1520+ FunctionSetResetClause :
1521+ SET set_rest_more { $$ = $2 ; }
1522+ | VariableResetStmt { $$ = (VariableSetStmt *) $1 ; }
1523+ ;
1524+
15151525
15161526VariableShowStmt :
15171527 SHOW var_name
@@ -6119,6 +6129,10 @@ common_func_opt_item:
61196129 {
61206130 $$ = makeDefElem(" leakproof" , (Node *)makeInteger(TRUE ));
61216131 }
6132+ | NOT LEAKPROOF
6133+ {
6134+ $$ = makeDefElem(" leakproof" , (Node *)makeInteger(FALSE ));
6135+ }
61226136 | COST NumericOnly
61236137 {
61246138 $$ = makeDefElem(" cost" , (Node *)$2 );
@@ -6127,7 +6141,7 @@ common_func_opt_item:
61276141 {
61286142 $$ = makeDefElem(" rows" , (Node *)$2 );
61296143 }
6130- | SetResetClause
6144+ | FunctionSetResetClause
61316145 {
61326146 /* we abuse the normal content of a DefElem here */
61336147 $$ = makeDefElem(" set" , (Node *)$1 );
0 commit comments