ALTER_CONVERSION(7pg13)
hiii bestie π welcome to the ALTER CONVERSION(7) page from the PostgreSQL 13.23 documentation. it's giving very niche, very powerful, and honestly kind of iconic β¨. let's get into it.
πΈ NAME πΈ
ALTER_CONVERSION β change the definition of a conversion π
π SYNOPSIS π
okay so here's the whole vibe, no cap:
ALTER CONVERSION name RENAME TO new_name
ALTER CONVERSION name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
ALTER CONVERSION name SET SCHEMA new_schema
those are literally the three forms. periodt.
π¦ DESCRIPTION π¦
ALTER CONVERSION changes the definition of a conversion. that's the main character move π«Ά.
but bestie, there are rules: 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. yes, all of that π.
the parenthetical tea β: 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. so yeah, superuser stays iconic π.
π PARAMETERS π
nameβ the name (optionally schema-qualified) of an existing conversion.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 π
to rename the conversion iso_8859_1_to_utf8 to latin1_to_unicode:
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;
slay. those are the exact commands, bestie π.
β COMPATIBILITY β
there is no ALTER CONVERSION statement in the SQL standard. periodt π.
π SEE ALSO π
CREATE CONVERSION(CREATE_CONVERSION(7))DROP CONVERSION(DROP_CONVERSION(7))
okay that's the whole page, bestie π«Ά. this lil icon is from the PostgreSQL 13.23 docs, dated 2025, and it's the ALTER CONVERSION(7) page. mwah πβ¨
π¦ 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