mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Disallow ALTER DOMAIN on non-domain type everywhere
This has been the behavior already in most cases, but through omission, ALTER DOMAIN / OWNER TO and ALTER DOMAIN / SET SCHEMA would silently work on non-domain types as well.
This commit is contained in:
@ -213,7 +213,7 @@ ExecAlterObjectSchemaStmt(AlterObjectSchemaStmt *stmt)
|
||||
|
||||
case OBJECT_TYPE:
|
||||
case OBJECT_DOMAIN:
|
||||
AlterTypeNamespace(stmt->object, stmt->newschema);
|
||||
AlterTypeNamespace(stmt->object, stmt->newschema, stmt->objectType);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -510,7 +510,7 @@ ExecAlterOwnerStmt(AlterOwnerStmt *stmt)
|
||||
|
||||
case OBJECT_TYPE:
|
||||
case OBJECT_DOMAIN: /* same as TYPE */
|
||||
AlterTypeOwner(stmt->object, newowner);
|
||||
AlterTypeOwner(stmt->object, newowner, stmt->objectType);
|
||||
break;
|
||||
|
||||
case OBJECT_TSDICTIONARY:
|
||||
|
Reference in New Issue
Block a user