pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: privileges oddity
Date: Fri, 07 Aug 2020 16:38:31 -0400
Message-ID: <2798112.1596832711@sss.pgh.pa.us> (raw)
In-Reply-To: <A7BB8B16-C2AD-47BC-BF78-CAACE6841C4A@elevated-dev.com>
References: <C2C6B9DD-6EFD-49DA-8673-1BBDA260329D@elevated-dev.com>
	<20200806185329.GC29590@tamriel.snowman.net>
	<DE16D13F-85A8-450C-92E1-643254A38E2D@elevated-dev.com>
	<75f2f28c-9121-c3d0-0c9a-f9b16ef337fb@aklaver.com>
	<B59F3687-372E-49EE-A200-938E3699A074@elevated-dev.com>
	<3DF00E97-6D2F-4329-AA0E-9CC2CCD41A8E@elevated-dev.com>
	<1ceb2a2f-50a0-ef7c-1849-6fa75dd61d64@aklaver.com>
	<5AA78DA8-746A-4407-AC00-B1463451CAD0@elevated-dev.com>
	<7efe4d40-5f8d-f3bb-45ff-fd00f3beba84@aklaver.com>
	<140C61E1-282D-42C2-8349-B5D11792DFCE@elevated-dev.com>
	<2793218.1596825900@sss.pgh.pa.us>
	<DA4A1A92-75A5-4DBE-AE71-33411213D112@elevated-dev.com>
	<99994f76-5a45-09a1-c6e3-4021cb4bd385@aklaver.com>
	<997A0678-B203-432F-AF7D-7ADB6415C28A@elevated-dev.com>
	<2795205.1596828723@sss.pgh.pa.us>
	<999BA1C4-FBF8-4EE1-B866-67AD3B500116@elevated-dev.com>
	<A7BB8B16-C2AD-47BC-BF78-CAACE6841C4A@elevated-dev.com>

Scott Ribe <scott_ribe@elevated-dev.com> writes:
> So, one last follow-up, perhaps \du or \du+ should show when a role is mapped that way. If I'd seen a clue to this setting that had been made "before I got here" it would have been figured out sooner.

\drds does already show this; of course, you have to know to look at it,
but the same could be said of \du ...

> I realize ALTER ROLE... SET... can be used to set many more defaults, and there could be some debate about how much to display with \du[+], but the fact that a role abandons all its privs and adopts a different set seems like pretty important info to surface ;-)

IIRC, you aren't the first to get burnt this way.  I've wondered for some
time if we shouldn't forbid certain GUCs from being set via ALTER ROLE or
ALTER DATABASE.  "role" and "session authorization" are the poster
children here but there might be others.  On the other hand, if we do so
somebody will likely complain that they have a legit use-case for it.

			regards, tom lane





view thread (31+ messages)

Message-ID: <2798112.1596832711@sss.pgh.pa.us>
Permalink:  ../2798112.1596832711@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2798112.1596832711@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, scott_ribe@elevated-dev.com, adrian.klaver@aklaver.com
  Subject: Re: privileges oddity
  In-Reply-To: <2798112.1596832711@sss.pgh.pa.us>
  References: <C2C6B9DD-6EFD-49DA-8673-1BBDA260329D@elevated-dev.com> <20200806185329.GC29590@tamriel.snowman.net> <DE16D13F-85A8-450C-92E1-643254A38E2D@elevated-dev.com> <75f2f28c-9121-c3d0-0c9a-f9b16ef337fb@aklaver.com> <B59F3687-372E-49EE-A200-938E3699A074@elevated-dev.com> <3DF00E97-6D2F-4329-AA0E-9CC2CCD41A8E@elevated-dev.com> <1ceb2a2f-50a0-ef7c-1849-6fa75dd61d64@aklaver.com> <5AA78DA8-746A-4407-AC00-B1463451CAD0@elevated-dev.com> <7efe4d40-5f8d-f3bb-45ff-fd00f3beba84@aklaver.com> <140C61E1-282D-42C2-8349-B5D11792DFCE@elevated-dev.com> <2793218.1596825900@sss.pgh.pa.us> <DA4A1A92-75A5-4DBE-AE71-33411213D112@elevated-dev.com> <99994f76-5a45-09a1-c6e3-4021cb4bd385@aklaver.com> <997A0678-B203-432F-AF7D-7ADB6415C28A@elevated-dev.com> <2795205.1596828723@sss.pgh.pa.us> <999BA1C4-FBF8-4EE1-B866-67AD3B500116@elevated-dev.com> <A7BB8B16-C2AD-47BC-BF78-CAACE6841C4A@elevated-dev.com> <2798112.1596832711@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