diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-12-23 09:06:44 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-12-23 09:06:44 -0300 |
commit | 7eca575d1c28f6eee2bf4564f3d458d10c4a8f47 (patch) | |
tree | b76301d5241e8720d23ae9020fac1b48d0af7c0e /src/backend/tcop/utility.c | |
parent | 584e35d17c00b69d598522d3cf321fbd9b7dbd03 (diff) | |
download | postgresql-7eca575d1c28f6eee2bf4564f3d458d10c4a8f47.tar.gz postgresql-7eca575d1c28f6eee2bf4564f3d458d10c4a8f47.zip |
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.
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index aa8fe880d7e..71580e8ec51 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -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: |