Re: REASSIGN OWNED simply doesn't work
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Sam Gendler <sgendler@ideasculptor.com>, "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2017-10-16T22:02:08Z
Lists: pgsql-general
David G. Johnston wrote:
> You could at least fix the documentation bug since this superuser-only
> restriction doesn't show up and is in fact contradicted by the sentence
> "REASSIGN OWNED requires privileges on both the source role(s) and the
> target role." The error message that comes back seems like it could be
> improved as well.
alvherre=# create role owner1;
CREATE ROLE
alvherre=# create role owner2;
CREATE ROLE
alvherre=# create role sam login;
CREATE ROLE
alvherre=# grant owner1 to sam;
GRANT ROLE
alvherre=# grant owner2 to sam;
GRANT ROLE
alvherre=# set session authorization owner1;
SET
alvherre=> create table owner1_table ();
CREATE TABLE
alvherre=> \q
RESET
$ psql alvherre -U sam
alvherre=> reassign owned by owner1 to owner2;
REASSIGN OWNED
alvherre=> \d
Listado de relaciones
Esquema │ Nombre │ Tipo │ Dueño
─────────┼──────────────┼───────┼────────
public │ owner1_table │ tabla │ owner2
> The word "privileges" there seems odd too, wouldn't "membership" be more
> appropriate?
>
> https://www.postgresql.org/docs/10/static/sql-reassign-owned.html
I can change that.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
REASSIGN OWNED BY doc: s/privileges/membership/
- 6ecabead4b59 11.0 landed