aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/gram.y14
-rw-r--r--src/include/nodes/parsenodes.h5
2 files changed, 18 insertions, 1 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 856d5dee0e7..15ece871a01 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10841,6 +10841,7 @@ TransactionStmt:
n->kind = TRANS_STMT_ROLLBACK;
n->options = NIL;
n->chain = $3;
+ n->location = -1;
$$ = (Node *) n;
}
| START TRANSACTION transaction_mode_list_or_empty
@@ -10849,6 +10850,7 @@ TransactionStmt:
n->kind = TRANS_STMT_START;
n->options = $3;
+ n->location = -1;
$$ = (Node *) n;
}
| COMMIT opt_transaction opt_transaction_chain
@@ -10858,6 +10860,7 @@ TransactionStmt:
n->kind = TRANS_STMT_COMMIT;
n->options = NIL;
n->chain = $3;
+ n->location = -1;
$$ = (Node *) n;
}
| ROLLBACK opt_transaction opt_transaction_chain
@@ -10867,6 +10870,7 @@ TransactionStmt:
n->kind = TRANS_STMT_ROLLBACK;
n->options = NIL;
n->chain = $3;
+ n->location = -1;
$$ = (Node *) n;
}
| SAVEPOINT ColId
@@ -10875,6 +10879,7 @@ TransactionStmt:
n->kind = TRANS_STMT_SAVEPOINT;
n->savepoint_name = $2;
+ n->location = @2;
$$ = (Node *) n;
}
| RELEASE SAVEPOINT ColId
@@ -10883,6 +10888,7 @@ TransactionStmt:
n->kind = TRANS_STMT_RELEASE;
n->savepoint_name = $3;
+ n->location = @3;
$$ = (Node *) n;
}
| RELEASE ColId
@@ -10891,6 +10897,7 @@ TransactionStmt:
n->kind = TRANS_STMT_RELEASE;
n->savepoint_name = $2;
+ n->location = @2;
$$ = (Node *) n;
}
| ROLLBACK opt_transaction TO SAVEPOINT ColId
@@ -10899,6 +10906,7 @@ TransactionStmt:
n->kind = TRANS_STMT_ROLLBACK_TO;
n->savepoint_name = $5;
+ n->location = @5;
$$ = (Node *) n;
}
| ROLLBACK opt_transaction TO ColId
@@ -10907,6 +10915,7 @@ TransactionStmt:
n->kind = TRANS_STMT_ROLLBACK_TO;
n->savepoint_name = $4;
+ n->location = @4;
$$ = (Node *) n;
}
| PREPARE TRANSACTION Sconst
@@ -10915,6 +10924,7 @@ TransactionStmt:
n->kind = TRANS_STMT_PREPARE;
n->gid = $3;
+ n->location = -1;
$$ = (Node *) n;
}
| COMMIT PREPARED Sconst
@@ -10923,6 +10933,7 @@ TransactionStmt:
n->kind = TRANS_STMT_COMMIT_PREPARED;
n->gid = $3;
+ n->location = -1;
$$ = (Node *) n;
}
| ROLLBACK PREPARED Sconst
@@ -10931,6 +10942,7 @@ TransactionStmt:
n->kind = TRANS_STMT_ROLLBACK_PREPARED;
n->gid = $3;
+ n->location = -1;
$$ = (Node *) n;
}
;
@@ -10942,6 +10954,7 @@ TransactionStmtLegacy:
n->kind = TRANS_STMT_BEGIN;
n->options = $3;
+ n->location = -1;
$$ = (Node *) n;
}
| END_P opt_transaction opt_transaction_chain
@@ -10951,6 +10964,7 @@ TransactionStmtLegacy:
n->kind = TRANS_STMT_COMMIT;
n->options = NIL;
n->chain = $3;
+ n->location = -1;
$$ = (Node *) n;
}
;
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 228cdca0f1b..fe003ded504 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -3538,9 +3538,12 @@ typedef struct TransactionStmt
NodeTag type;
TransactionStmtKind kind; /* see above */
List *options; /* for BEGIN/START commands */
- char *savepoint_name; /* for savepoint commands */
+ /* for savepoint commands */
+ char *savepoint_name pg_node_attr(query_jumble_ignore);
char *gid; /* for two-phase-commit related commands */
bool chain; /* AND CHAIN option */
+ /* token location, or -1 if unknown */
+ int location pg_node_attr(query_jumble_location);
} TransactionStmt;
/* ----------------------