ALTER_CONVERSION(7pg14)

πŸ“¦ version 14.24, in opensuse-leap 16.0

πŸ’– 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 πŸ¦‹


xoxo, PostgreSQL 14.24 Β· 2026 Β· ALTER CONVERSION(7) πŸ’–βœ¨

πŸ“¦ where this page comes from