ALTER_SCHEMA(7pg13)
okay bestie, this is the ALTER_SCHEMA(7) page from the PostgreSQL 13.23 Documentation π
itβs short, itβs iconic, and weβre getting into it.
π NAME π
ALTER_SCHEMAβ change the definition of a schema. slay.
β¨ SYNOPSIS β¨
ALTER SCHEMA name RENAME TO new_name
ALTER SCHEMA name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
π¦ DESCRIPTION π¦
ALTER SCHEMA changes the definition of a schema. literally its whole job.
You must own the schema to use ALTER SCHEMA. To rename a schema you must also have the CREATE privilege for the database. To alter the owner, you must also be a direct or indirect member of the new owning role, and you must have the CREATE privilege for the database. (Note that superusers have all these privileges automatically.) π
π PARAMETERS π
nameβ the name of an existing schema. bless.new_nameβ the new name of the schema. hard rule bestie: the new name cannot begin withpg_, as such names are reserved for system schemas. π«new_ownerβ the new owner of the schema. hand over the crown. π
π COMPATIBILITY π
There is no ALTER SCHEMA statement in the SQL standard. not a single one. wild. π
π SEE ALSO π
CREATE SCHEMA(CREATE_SCHEMA(7))DROP SCHEMA(DROP_SCHEMA(7))
π thatβs the whole vibe β brought to you by PostgreSQL 13.23, dated 2025. periodt. π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms