mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
get_object_address: separate domain constraints from table constraints
Apart from enabling comments on domain constraints, this enables a future project to replicate object dropping to remote servers: with the current mechanism there's no way to distinguish between the two types of constraints, so there's no way to know what to drop. Also added support for the domain constraint comments in psql's \dd and pg_dump. Catalog version bumped due to the change in ObjectType enum.
This commit is contained in:
@@ -1589,9 +1589,6 @@ AlterObjectTypeCommandTag(ObjectType objtype)
|
||||
case OBJECT_COLUMN:
|
||||
tag = "ALTER TABLE";
|
||||
break;
|
||||
case OBJECT_CONSTRAINT:
|
||||
tag = "ALTER TABLE";
|
||||
break;
|
||||
case OBJECT_CONVERSION:
|
||||
tag = "ALTER CONVERSION";
|
||||
break;
|
||||
@@ -1599,6 +1596,7 @@ AlterObjectTypeCommandTag(ObjectType objtype)
|
||||
tag = "ALTER DATABASE";
|
||||
break;
|
||||
case OBJECT_DOMAIN:
|
||||
case OBJECT_DOMCONSTRAINT:
|
||||
tag = "ALTER DOMAIN";
|
||||
break;
|
||||
case OBJECT_EXTENSION:
|
||||
@@ -1650,6 +1648,7 @@ AlterObjectTypeCommandTag(ObjectType objtype)
|
||||
tag = "ALTER SEQUENCE";
|
||||
break;
|
||||
case OBJECT_TABLE:
|
||||
case OBJECT_TABCONSTRAINT:
|
||||
tag = "ALTER TABLE";
|
||||
break;
|
||||
case OBJECT_TABLESPACE:
|
||||
|
Reference in New Issue
Block a user