ALTER_LARGE_OBJECT(7pg14)

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

✨ ALTER LARGE OBJECT ✨

okay so real talk bestie, we're in the PostgreSQL 14.24 Documentation and this page is all about ALTER LARGE OBJECT β€” the ALTER LARGE OBJECT(7) glow-up page, if you will πŸ’…


🌸 NAME 🌸

ALTER_LARGE_OBJECT β€” change the definition of a large object πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

ALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }

like, that's the whole vibe. one statement. one job. she's focused πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

ALTER LARGE OBJECT changes the definition of a large object. fr fr, that's it, that's the whole thing ✨

okay but here's the part where you gotta listen, bestie πŸ‘€ β€” you must own the large object to use ALTER LARGE OBJECT. no ownership, no entry, iykyk. and if you're trying to alter the owner, you also have to be a direct or indirect member of the new owning role. like, you gotta be in the group chat to hand over the group chat, you know? 🫢

(however, a superuser can alter any large object anyway β€” main character energy, they literally don't need permission πŸ’€)

and here's the little plot twist: currently, the only functionality is to assign a new owner, so both restrictions always apply. every single time. no shortcuts, no workarounds, no cap 🧚


🌈 PARAMETERS 🌈

  • large_object_oid β€” the OID of the large object to be altered. that's the one getting her moment πŸ’«
  • new_owner β€” the new owner of the large object. passing the crown πŸ‘‘

⭐ COMPATIBILITY ⭐

there is no ALTER LARGE OBJECT statement in the SQL standard. nope. not a thing. Postgres said "I'll make my own" and honestly? slay πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

  • Chapter 35 β€” go read it, bestie, it's giving essential context πŸ“š

vibe check reminder: own the object, be a member of the new owning role (or be a superuser, the ultimate flex), and you're golden πŸ’œ

signing off from the PostgreSQL 14.24 docs, dated 2026 β€” this has been ALTER LARGE OBJECT(7), and she ate, no crumbs πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from