doc: Document effects of ownership change on privileges

Explicitly document that privileges are transferred along with the
ownership. Backpatch to all supported versions since this behavior
has always been present.

Author: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Josef Šimánek <josef.simanek@gmail.com>
Reported-by: Gilles Parc <gparc@free.fr>
Discussion: https://postgr.es/m/2023185982.281851219.1646733038464.JavaMail.root@zimbra15-e2.priv.proxad.net
Backpatch-through: 14
REL_16_STABLE
Daniel Gustafsson 1 month ago
parent 995c971832
commit ecb884b58e
  1. 2
      doc/src/sgml/ddl.sgml

@ -1746,6 +1746,8 @@ ALTER TABLE <replaceable>table_name</replaceable> OWNER TO <replaceable>new_owne
Superusers can always do this; ordinary roles can only do it if they are Superusers can always do this; ordinary roles can only do it if they are
both the current owner of the object (or inherit the privileges of the both the current owner of the object (or inherit the privileges of the
owning role) and able to <literal>SET ROLE</literal> to the new owning role. owning role) and able to <literal>SET ROLE</literal> to the new owning role.
All object privileges of the old owner are transferred to the new owner
along with the ownership.
</para> </para>
<para> <para>

Loading…
Cancel
Save