aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2011-12-22 22:43:56 +0200
committerPeter Eisentraut <peter_e@gmx.net>2011-12-22 22:43:56 +0200
commitf90dd28062db2128a340fbe02f55829f15ab5561 (patch)
tree06636b98c913bfde151cc5ce2d62649f4a14eedb /src/backend/parser
parent8d15e3ec4fcb735875a8a70a09ec0c62153c3329 (diff)
downloadpostgresql-f90dd28062db2128a340fbe02f55829f15ab5561.tar.gz
postgresql-f90dd28062db2128a340fbe02f55829f15ab5561.zip
Add ALTER DOMAIN ... RENAME
You could already rename domains using ALTER TYPE, but with this new command it is more consistent with how other commands treat domains as a subcategory of types.
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index e0ff49f048a..7e8f39abdf7 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -6451,6 +6451,14 @@ RenameStmt: ALTER AGGREGATE func_name aggr_args RENAME TO name
n->newname = $6;
$$ = (Node *)n;
}
+ | ALTER DOMAIN_P any_name RENAME TO name
+ {
+ RenameStmt *n = makeNode(RenameStmt);
+ n->renameType = OBJECT_DOMAIN;
+ n->object = $3;
+ n->newname = $6;
+ $$ = (Node *)n;
+ }
| ALTER FOREIGN DATA_P WRAPPER name RENAME TO name
{
RenameStmt *n = makeNode(RenameStmt);