ALTER LARGE OBJECT

A DDL command to change ownership of a large object

ALTER LARGE OBJECT is a DDL command to change ownership of a large object.

ALTER LARGE OBJECT was added in PostgreSQL 9.0.

Change history

Examples

Using ALTER LARGE OBJECT to alter ownership of a large object:

postgres=# \lo_import /tmp/random-meme.gif 'popular animated meme'
lo_import 16459

postgres=# \dl
         Large objects
  ID   |  Owner   |     Description
-------+----------+----------------------
 16459 | postgres | popular animated meme
(1 row)

postgres=# ALTER LARGE OBJECT 16459 OWNER TO lo_usr;
ALTER LARGE OBJECT

postgres=# \dl
        Large objects
  ID   | Owner  |     Description
-------+--------+----------------------
 16459 | lo_usr | popular animated meme
(1 row) 

Categories

DDL, Large object, SQL command

See also

pg_largeobject_metadata