!2737 函数pgaudit_ProcessUtility内T_AlterTableStmt分支判断sequence有误

Merge pull request !2737 from foolishlee/pgaudit_ProcessUtility_relkind
This commit is contained in:
opengauss-bot
2023-01-06 06:11:05 +00:00
committed by Gitee

View File

@ -1381,7 +1381,7 @@ static void pgaudit_ProcessUtility(Node* parsetree, const char* queryString, Par
} break;
case T_AlterTableStmt: {
AlterTableStmt* altertablestmt = (AlterTableStmt*)(parsetree); /* Audit alter table */
if (RELKIND_IS_SEQUENCE(altertablestmt->relkind)) {
if (OBJECT_SEQUENCE == altertablestmt->relkind || OBJECT_LARGE_SEQUENCE == altertablestmt->relkind) {
pgaudit_ddl_sequence(altertablestmt->relation->relname, queryString);
} else {
pgaudit_ddl_table(altertablestmt->relation->relname, queryString);