mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-09 06:22:57 +00:00
fix errors
This commit is contained in:
@@ -573,6 +573,13 @@ IsPrivilegedRole(const char *role_name)
|
||||
return strcmp(role_name, privileged_role_name) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
HandleOtherDDLCommand()
|
||||
{
|
||||
InitCurrentDdlTableIfNeeded();
|
||||
CurrentDdlTable->other_ddl_count++;
|
||||
}
|
||||
|
||||
static void
|
||||
HandleCreateDb(CreatedbStmt *stmt)
|
||||
{
|
||||
@@ -622,8 +629,11 @@ HandleAlterOwner(AlterOwnerStmt *stmt)
|
||||
DbEntry *entry;
|
||||
const char *new_owner;
|
||||
|
||||
if (stmt->objectType != OBJECT_DATABASE)
|
||||
return;
|
||||
if (stmt->objectType != OBJECT_DATABASE){
|
||||
HandleOtherDDLCommand();
|
||||
return ;
|
||||
}
|
||||
|
||||
InitDbTableIfNeeded();
|
||||
|
||||
name = strVal(stmt->object);
|
||||
@@ -850,14 +860,12 @@ HandleRename(RenameStmt *stmt)
|
||||
return HandleDbRename(stmt);
|
||||
else if (stmt->renameType == OBJECT_ROLE)
|
||||
return HandleRoleRename(stmt);
|
||||
else {
|
||||
HandleOtherDDLCommand();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
HandleOtherDDLCommand()
|
||||
{
|
||||
InitCurrentDdlTableIfNeeded();
|
||||
CurrentDdlTable->other_ddl_count++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Support for Event Triggers.
|
||||
@@ -1386,8 +1394,8 @@ NeonProcessUtility(
|
||||
|
||||
// Generic Operations (object type dependent)
|
||||
case T_DropStmt: // DROP (tables, views, functions, etc.)
|
||||
case T_RenameStmt: // ALTER ... RENAME TO
|
||||
case T_AlterOwnerStmt: // ALTER ... OWNER TO
|
||||
// case T_RenameStmt: // ALTER ... RENAME TO
|
||||
// case T_AlterOwnerStmt: // ALTER ... OWNER TO
|
||||
case T_AlterObjectDependsStmt: // ALTER ... DEPENDS ON
|
||||
case T_AlterObjectSchemaStmt: // ALTER ... SET SCHEMA
|
||||
case T_CommentStmt: // COMMENT ON
|
||||
|
||||
Reference in New Issue
Block a user