pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15546: alter large object n owner to new owner
2+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2018-12-11 d65ddb2b56 9fbe7d9740 b10997b5b3 b48cfafd5f 733f3588cd a96722938e Doc: improve documentation about ALTER LARGE OBJECT requirements.
* BUG #15546: alter large object n owner to new owner
@ 2018-12-11 13:15 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2018-12-11 13:15 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: git17@ska67.de
The following bug has been logged on the website:
Bug reference: 15546
Logged by: Stefan Kadow
Email address: git17@ska67.de
PostgreSQL version: 9.6.10
Operating system: Debian 9.6 (Stretch)
Description:
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".
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #15546: alter large object n owner to new owner
@ 2018-12-11 16:08 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2018-12-11 16:08 UTC (permalink / raw)
To: git17@ska67.de; +Cc: pgsql-bugs@lists.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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-12-11 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 13:15 BUG #15546: alter large object n owner to new owner PG Bug reporting form <noreply@postgresql.org>
2018-12-11 16:08 ` Tom Lane <tgl@sss.pgh.pa.us>
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