pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: git17@ska67.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15546: alter large object n owner to new owner
Date: Tue, 11 Dec 2018 11:08:29 -0500
Message-ID: <10843.1544544509@sss.pgh.pa.us> (raw)
In-Reply-To: <15546-0558c75fd2025e7c@postgresql.org>
References: <15546-0558c75fd2025e7c@postgresql.org>

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> Documentation describes:
> ALTER LARGE OBJECT large_object_oid OWNER TO { new_owner | CURRENT_USER |
> SESSION_USER }
> You must be superuser or owner of the large object to use ALTER LARGE
> OBJECT.

> If you want to use this statement for assigning a "new owner", you have to
> be a superuser.
> If you are only the owner of the large object, you receive an error message
> Postgresql-Error 42501 saying that you must be in the role of the "new
> owner".

Yeah, the ALTER LARGE OBJECT page could use improvement.  The correct
general rule is explained in section 5.6:

    An object can be assigned to a new owner with an ALTER command of the
    appropriate kind for the object, e.g. ALTER TABLE. Superusers can
    always do this; ordinary roles can only do it if they are both the
    current owner of the object (or a member of the owning role) and a
    member of the new owning role.

Most other ALTER-something pages have wording like "To alter the owner,
you must also be a direct or indirect member of the new owning role",
but this seems to have been missed in the ALTER LARGE OBJECT docs.

			regards, tom lane




view thread (2+ messages)

Message-ID: <10843.1544544509@sss.pgh.pa.us>
Permalink:  ../10843.1544544509@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10843.1544544509@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, git17@ska67.de, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #15546: alter large object n owner to new owner
  In-Reply-To: <10843.1544544509@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox