Re: REASSIGN OWNED simply doesn't work

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Sam Gendler <sgendler(at)ideasculptor(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: REASSIGN OWNED simply doesn't work
Date: 2017-10-16 22:02:08
Message-ID: 20171016220208.ieyxzk4n27jdh2zi@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2017-10-17 01:17:39 PGConf.ASIA and VISA
Previous Message Sam Gendler 2017-10-16 17:57:04 Re: REASSIGN OWNED simply doesn't work