From 5507b22dfcde9f86590e3904f6279d3600abe1b7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 19 Mar 2008 18:38:30 +0000 Subject: Support ALTER TYPE RENAME. Petr Jelinek --- doc/src/sgml/ref/alter_type.sgml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/alter_type.sgml b/doc/src/sgml/ref/alter_type.sgml index c4f9edd399a..6f16da62425 100644 --- a/doc/src/sgml/ref/alter_type.sgml +++ b/doc/src/sgml/ref/alter_type.sgml @@ -1,5 +1,5 @@ @@ -24,6 +24,7 @@ PostgreSQL documentation +ALTER TYPE name RENAME TO new_name ALTER TYPE name OWNER TO new_owner ALTER TYPE name SET SCHEMA new_schema @@ -34,8 +35,6 @@ ALTER TYPE name SET SCHEMA ALTER TYPE changes the definition of an existing type. - The only currently available capabilities are changing the owner and schema - of a type. @@ -65,6 +64,15 @@ ALTER TYPE name SET SCHEMA + + new_name + + + The new name for the type. + + + + new_owner @@ -91,7 +99,14 @@ ALTER TYPE name SET SCHEMA Examples - To change the owner of the user-defined type email + To rename a data type: + +ALTER TYPE electronic_mail RENAME TO email; + + + + + To change the owner of the type email to joe: ALTER TYPE email OWNER TO joe; @@ -99,7 +114,7 @@ ALTER TYPE email OWNER TO joe; - To change the schema of the user-defined type email + To change the schema of the type email to customers: ALTER TYPE email SET SCHEMA customers; -- cgit v1.2.3