ALTER_CONVERSION(7pg14)
π NAME π β ALTER_CONVERSION(7)
ALTER_CONVERSION β change the definition of a conversion
Okay so bestie, welcome to the ALTER_CONVERSION(7) page straight from the PostgreSQL 14.24 Documentation π«Ά. This is the command that changes a conversionβs definition. Short, iconic, and lowkey powerful. Letβs go β¨
β¨ SYNOPSIS β¨
ALTER CONVERSION name RENAME TO new_name
ALTER CONVERSION name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER CONVERSION name SET SCHEMA new_schema
π«Ά DESCRIPTION π«Ά
ALTER CONVERSION changes the definition of a conversion. Thatβs the whole vibe check π
.
But permissions, bestie β listen up π. You must own the conversion to use ALTER CONVERSION. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have CREATE privilege on the conversionβs schema. (These restrictions enforce that altering the owner doesnβt do anything you couldnβt do by dropping and recreating the conversion. However, a superuser can alter ownership of any conversion anyway.) No cap π§
π PARAMETERS π
nameβ the name of an existing conversion, optionally schema-qualified.new_nameβ the new name of the conversion.new_ownerβ the new owner of the conversion.new_schemaβ the new schema for the conversion.
π₯ EXAMPLES π₯
Wanna rename the conversion iso_8859_1_to_utf8 to latin1_to_unicode? Slay, do this:
ALTER CONVERSION iso_8859_1_to_utf8 RENAME TO latin1_to_unicode;
To change the owner of the conversion iso_8859_1_to_utf8 to joe:
ALTER CONVERSION iso_8859_1_to_utf8 OWNER TO joe;
π COMPATIBILITY π
There is no ALTER CONVERSION statement in the SQL standard. Periodt π
π¦ SEE ALSO π¦
CREATE CONVERSION(CREATE_CONVERSION(7))DROP CONVERSION(DROP_CONVERSION(7))
xoxo, PostgreSQL 14.24 Β· 2026 Β· ALTER CONVERSION(7) πβ¨
π¦ 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