ALTER_SCHEMA(7pg14)
π NAME π
okay so bestie, this is ALTER_SCHEMA from the PostgreSQL 14.24 Documentation β the page about changing the definition of a schema. iconic behavior, honestly.
β¨ SYNOPSIS β¨
ALTER SCHEMA name RENAME TO new_name
ALTER SCHEMA name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
π¦ DESCRIPTION π¦
ALTER SCHEMA changes the definition of a schema. thatβs the whole vibe.
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.) slay for them.
π PARAMETERS π
nameβ the name of an existing schema.new_nameβ the new name of the schema. The new name cannot begin withpg_, because those names are reserved for system schemas. no cap.new_ownerβ the new owner of the schema.
π COMPATIBILITY π
There is no ALTER SCHEMA statement in the SQL standard. not a thing. periodt.
π«Ά SEE ALSO π«Ά
CREATE SCHEMA(CREATE_SCHEMA(7))DROP SCHEMA(DROP_SCHEMA(7))
later bestie π β xoxo, your ALTER_SCHEMA(7) page from PostgreSQL 14.24, dated 2026.
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-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