select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SQL COMMANDS / OTHER OBJECTS

ALTER LARGE OBJECT

Read PG 18 manual ↗

change the definition of a large object

Syntax

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

Read left to right. Branches are choices, bypasses are optional, loops repeat. Select an underlined parameter to open its rule.

ALTER LARGE OBJECT large_object_oid OWNER TO new_owner CURRENT_ROLE CURRENT_USER SESSION_USER

Description

ALTER LARGE OBJECT changes the definition of a large object.

You must own the large object to use ALTER LARGE OBJECT. To alter the owner, you must also be able to SET ROLE to the new owning role. (However, a superuser can alter any large object anyway.) Currently, the only functionality is to assign a new owner, so both restrictions always apply.

Parameters

large_object_oid

OID of the large object to be altered

new_owner

The new owner of the large object

Compatibility

There is no ALTER LARGE OBJECT statement in the SQL standard.

See Also

Chapter 33
Version history 5
  1. PG 16 → 17changed
  2. PG 15 → 16changed
  3. PG 13 → 14changed
  4. PG 11 → 12changed
  5. PG 10 → 11changed

Definition snapshot: 2026-09-14T13:14:25.700916+00:00@99e6866c · English manual source