!3688 with consistent snapshot需求添加B模式的限制
Merge pull request !3688 from 魏文韬/set_with_snapshot
This commit is contained in:
@ -19064,6 +19064,15 @@ TransactionStmt:
|
|||||||
}
|
}
|
||||||
| START TRANSACTION WITH CONSISTENT SNAPSHOT
|
| START TRANSACTION WITH CONSISTENT SNAPSHOT
|
||||||
{
|
{
|
||||||
|
if (!DB_IS_CMPT(B_FORMAT)) {
|
||||||
|
const char* message = "WITH CONSISTENT SNAPSHOT is supported only in B-format database.";
|
||||||
|
InsertErrorMessage(message, u_sess->plsql_cxt.plpgsql_yylloc);
|
||||||
|
ereport(errstate,
|
||||||
|
(errmodule(MOD_PARSER),
|
||||||
|
errcode(ERRCODE_SYNTAX_ERROR),
|
||||||
|
errmsg("WITH CONSISTENT SNAPSHOT is supported only in B-format database."),
|
||||||
|
parser_errposition(@3)));
|
||||||
|
}
|
||||||
TransactionStmt *n = makeNode(TransactionStmt);
|
TransactionStmt *n = makeNode(TransactionStmt);
|
||||||
n->kind = TRANS_STMT_START;
|
n->kind = TRANS_STMT_START;
|
||||||
n->options = NIL;
|
n->options = NIL;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
\c regression
|
||||||
|
start transaction with consistent snapshot;
|
||||||
create database with_snapshot_test dbcompatibility 'b';
|
create database with_snapshot_test dbcompatibility 'b';
|
||||||
\c with_snapshot_test;
|
\c with_snapshot_test;
|
||||||
set global transaction isolation level repeatable read;
|
set global transaction isolation level repeatable read;
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
\c regression
|
||||||
|
start transaction with consistent snapshot;
|
||||||
|
ERROR: WITH CONSISTENT SNAPSHOT is supported only in B-format database.
|
||||||
|
LINE 1: start transaction with consistent snapshot;
|
||||||
|
^
|
||||||
create database with_snapshot_test dbcompatibility 'b';
|
create database with_snapshot_test dbcompatibility 'b';
|
||||||
\c with_snapshot_test;
|
\c with_snapshot_test;
|
||||||
set global transaction isolation level repeatable read;
|
set global transaction isolation level repeatable read;
|
||||||
|
Reference in New Issue
Block a user