Index: doc/src/sgml/ref/alter_aggregate.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/alter_aggregate.sgml,v
retrieving revision 1.5
diff -c -B -r1.5 alter_aggregate.sgml
*** doc/src/sgml/ref/alter_aggregate.sgml 25 Jun 2004 21:55:50 -0000 1.5
--- doc/src/sgml/ref/alter_aggregate.sgml 1 Aug 2005 14:26:24 -0000
***************
*** 22,27 ****
--- 22,28 ----
ALTER AGGREGATE name ( type ) RENAME TO newname
ALTER AGGREGATE name ( type ) OWNER TO newowner
+ ALTER AGGREGATE name ( type ) SET SCHEMA schema_name
***************
*** 75,80 ****
--- 76,91 ----
+
+
+ schema_name
+
+
+ The new schema name of the aggregate function. You must be the owner
+ of the aggregate function to change its schema.
+
+
+
***************
*** 96,101 ****
--- 107,120 ----
ALTER AGGREGATE myavg(integer) OWNER TO joe;
+
+
+ To change the schema of the aggregate function myavg for type
+ integer to myschema:
+
+ ALTER AGGREGATE myavg(integer) SET SCHEMA myschema;
+
+
Index: doc/src/sgml/ref/alter_domain.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/alter_domain.sgml,v
retrieving revision 1.16
diff -c -B -r1.16 alter_domain.sgml
*** doc/src/sgml/ref/alter_domain.sgml 14 Jul 2005 06:17:36 -0000 1.16
--- doc/src/sgml/ref/alter_domain.sgml 1 Aug 2005 14:26:24 -0000
***************
*** 34,39 ****
--- 34,41 ----
DROP CONSTRAINT constraint_name [ RESTRICT | CASCADE ]
ALTER DOMAIN name
OWNER TO new_owner
+ ALTER DOMAIN name
+ SET SCHEMA schema_name
***************
*** 97,102 ****
--- 99,113 ----
+
+
+ SET SCHEMA
+
+
+ This form changes the schema of the domain.
+
+
+
***************
*** 166,171 ****
--- 177,191 ----
+
+ schema_name
+
+
+ The new schema name of the domain.
+
+
+
+
***************
*** 197,202 ****
--- 217,229 ----
ALTER DOMAIN zipcode DROP CONSTRAINT zipchk;
+
+
+ To move the domain into a different schema customers:
+
+ ALTER DOMAIN zipcode SET SCHEMA customers;
+
+
Index: doc/src/sgml/ref/alter_function.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/alter_function.sgml,v
retrieving revision 1.7
diff -c -B -r1.7 alter_function.sgml
*** doc/src/sgml/ref/alter_function.sgml 26 May 2005 20:05:03 -0000 1.7
--- doc/src/sgml/ref/alter_function.sgml 1 Aug 2005 14:26:25 -0000
***************
*** 26,31 ****
--- 26,33 ----
RENAME TO newname
ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
OWNER TO newowner
+ ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
+ SET SCHEMA schema_name
where action is one of:
***************
*** 118,123 ****
--- 120,135 ----
+
+ schema_name
+
+
+ The new schema of the function. You must own the function to change its
+ current schema.
+
+
+
+
CALLED ON NULL INPUT
RETURNS NULL ON NULL INPUT
***************
*** 193,198 ****
--- 205,218 ----
ALTER FUNCTION sqrt(integer) OWNER TO joe;
+
+
+ To change the schema of the function sqrt for type
+ integer to maths:
+
+ ALTER FUNCTION sqrt(integer) SET SCHEMA maths;
+
+
Index: doc/src/sgml/ref/alter_sequence.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/alter_sequence.sgml,v
retrieving revision 1.9
diff -c -B -r1.9 alter_sequence.sgml
*** doc/src/sgml/ref/alter_sequence.sgml 27 Nov 2004 21:27:07 -0000 1.9
--- doc/src/sgml/ref/alter_sequence.sgml 1 Aug 2005 14:26:25 -0000
***************
*** 27,32 ****
--- 27,33 ----
ALTER SEQUENCE name [ INCREMENT [ BY ] increment ]
[ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
[ RESTART [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
+ ALTER SEQUENCE name SET SCHEMA schema_name
***************
*** 155,160 ****
--- 156,171 ----
+
+
+ schema_name
+
+
+ The new schema name of the sequence. You are required to be the owner
+ of the sequence in order to change its schema.
+
+
+
***************
*** 193,199 ****
Compatibility
! ALTER SEQUENCE conforms with SQL:2003.
--- 204,212 ----
Compatibility
! ALTER SEQUENCE conforms with SQL:2003,
! except for the SET SCHEMA variant, which is a
! PostgreSQL extension.
Index: doc/src/sgml/ref/alter_table.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v
retrieving revision 1.77
diff -c -B -r1.77 alter_table.sgml
*** doc/src/sgml/ref/alter_table.sgml 14 Jan 2005 01:16:52 -0000 1.77
--- doc/src/sgml/ref/alter_table.sgml 1 Aug 2005 14:26:27 -0000
***************
*** 44,49 ****
--- 44,50 ----
SET WITHOUT OIDS
OWNER TO new_owner
SET TABLESPACE tablespace_name
+ SET SCHEMA schema_name
***************
*** 240,245 ****
--- 241,256 ----
+ SET SCHEMA
+
+
+ This form changes the schema of the table including all indexes and
+ sequences of any SERIAL columns.
+
+
+
+
+
SET TABLESPACE
***************
*** 279,284 ****
--- 290,301 ----
You must own the table to use ALTER TABLE>; except for
ALTER TABLE OWNER>, which may only be executed by a superuser.
+
+
+ Changing the schema of a table requires you to have CREATE
+ privileges on both, the old and new schema.
+ See also for more information.
+
***************
*** 405,410 ****
--- 422,436 ----
+
+ schema_name
+
+
+ The schema name to which the table will be moved.
+
+
+
+
Index: doc/src/sgml/ref/alter_type.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/alter_type.sgml,v
retrieving revision 1.1
diff -c -B -r1.1 alter_type.sgml
*** doc/src/sgml/ref/alter_type.sgml 25 Jun 2004 21:55:50 -0000 1.1
--- doc/src/sgml/ref/alter_type.sgml 1 Aug 2005 14:26:27 -0000
***************
*** 25,30 ****
--- 25,31 ----
ALTER TYPE name OWNER TO new_owner
+ ALTER TYPE name SET SChEMA schema_name
***************
*** 33,39 ****
ALTER TYPE changes the definition of an existing type.
! The only currently available capability is changing the owner of a type.
--- 34,40 ----
ALTER TYPE changes the definition of an existing type.
! The only currently available capabilities are changing the owner and schema of a type.
***************
*** 62,72 ****
--- 63,94 ----
+
+ schema_name
+
+
+ The new schema name of the type. You must be owner of the type to change
+ its schema.
+
+
+
+
+ Notes
+
+
+ To change a type's schema you are required to have CREATE
+ privileges on the old an new schema. See also
+ for more information.
+
+
+
+
+
Examples
***************
*** 76,81 ****
--- 98,111 ----
ALTER TYPE email OWNER TO joe;
+
+
+ To change the schema of the user-defined type email
+ to customers
+
+ ALTER TYPE email SET SCHEMA customers;
+
+