]> begriffs open source - ai-pg/blob - full-docs/txt/sql-alterschema.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-alterschema.txt
1
2 ALTER SCHEMA
3
4    ALTER SCHEMA — change the definition of a schema
5
6 Synopsis
7
8 ALTER SCHEMA name RENAME TO new_name
9 ALTER SCHEMA name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_U
10 SER }
11
12 Description
13
14    ALTER SCHEMA changes the definition of a schema.
15
16    You must own the schema to use ALTER SCHEMA. To rename a schema you
17    must also have the CREATE privilege for the database. To alter the
18    owner, you must be able to SET ROLE to the new owning role, and that
19    role must have the CREATE privilege for the database. (Note that
20    superusers have all these privileges automatically.)
21
22 Parameters
23
24    name
25           The name of an existing schema.
26
27    new_name
28           The new name of the schema. The new name cannot begin with pg_,
29           as such names are reserved for system schemas.
30
31    new_owner
32           The new owner of the schema.
33
34 Compatibility
35
36    There is no ALTER SCHEMA statement in the SQL standard.
37
38 See Also
39
40    CREATE SCHEMA, DROP SCHEMA