ALTER_CONVERSION(7pg13)

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

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


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