mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Make more use of castNode()
This commit is contained in:
@ -7322,7 +7322,7 @@ ExecSetVariableStmt(VariableSetStmt *stmt, bool isTopLevel)
|
||||
}
|
||||
else if (strcmp(stmt->name, "TRANSACTION SNAPSHOT") == 0)
|
||||
{
|
||||
A_Const *con = (A_Const *) linitial(stmt->args);
|
||||
A_Const *con = castNode(A_Const, linitial(stmt->args));
|
||||
|
||||
if (stmt->is_local)
|
||||
ereport(ERROR,
|
||||
@ -7330,7 +7330,6 @@ ExecSetVariableStmt(VariableSetStmt *stmt, bool isTopLevel)
|
||||
errmsg("SET LOCAL TRANSACTION SNAPSHOT is not implemented")));
|
||||
|
||||
WarnNoTransactionChain(isTopLevel, "SET TRANSACTION");
|
||||
Assert(IsA(con, A_Const));
|
||||
Assert(nodeTag(&con->val) == T_String);
|
||||
ImportSnapshot(strVal(&con->val));
|
||||
}
|
||||
|
Reference in New Issue
Block a user