1
0
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:
Peter Eisentraut
2017-02-21 11:33:07 -05:00
parent 4e5ce3c1ae
commit 38d103763d
37 changed files with 121 additions and 222 deletions

View File

@ -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));
}