Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pnflh-0001oo-P2 for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Apr 2023 13:16:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pnfle-0001vd-Pa for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Apr 2023 13:16:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pnfle-0001vT-C0 for pgsql-hackers@lists.postgresql.org; Sat, 15 Apr 2023 13:16:38 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pnflW-0004hD-Gl for pgsql-hackers@lists.postgresql.org; Sat, 15 Apr 2023 13:16:36 +0000 Received: from [192.168.0.104] (unknown [62.217.188.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 23C9821CFCAF; Sat, 15 Apr 2023 16:16:27 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1681564587; bh=v6g8j9/3KCeLKcwVEpqmtYBN4+wpo/Wyy1MZVPVz1h4=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=WNSNwcT9zCQ8F+1tSIS/K/EistHoBcHgrczX/7X2qNbmDJL0SI9E7Mh07m3Qv5rdi sZ+sUlC/LEBGTlClmxAFywZV5ptoZpe9pktm1kAD0kWtuB58+NpnytQMWqf+u5pS7C Y4sETQaF84RR9gzsVUxwGu0LblN6JgSqZ56zWDZ4= Message-ID: Date: Sat, 15 Apr 2023 16:16:26 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: psql: Add role's membership options to the \du+ command Content-Language: en-US To: Kyotaro Horiguchi Cc: david.g.johnston@gmail.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, david.zhang@highgo.ca, pgsql-hackers@lists.postgresql.org References: <1831161.1680703111@sss.pgh.pa.us> <20230414.162829.373160465721252149.horikyota.ntt@gmail.com> From: Pavel Luzanov In-Reply-To: <20230414.162829.373160465721252149.horikyota.ntt@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 14.04.2023 10:28, Kyotaro Horiguchi wrote: > As David-G appears to express concern in upthread, I don't think a > direct Japanese translation from "rolename from rolename" works well, > as the "from" needs accompanying verb. I, as a Japanese speaker, I > prefer a more non-sentence-like notation, similar to David's > suggestion but with slight differences: > > "pg_read_all_stats (grantor: postgres, inherit, set)" In this form, it confuses me that 'postgres' and 'inherit, set' look like a common list. > Come to think of this, I recalled a past discussion in which we > concluded that translating punctuation marks appearing between a > variable number of items within list expressions should be avoided... > > Thus, I'd like to propose to use an ACL-like notation, which doesn't > need translation. > > ..| Mamber of | > ..| pg_read_server_files=ais/horiguti,pg_execute_server_program=/postgres | It's very tempting to do so. But I don't like this approach. Showing membership options as an ACL-like column will be confusing. Even in your example, my first reaction is that pg_execute_server_program is available to public. (As for the general patterns, we can also consider combining three options into one column, like pg_class.reloptions.) So, yet another way to discuss: pg_read_all_stats(inherit,set/horiguti) pg_execute_server_program(empty/postgres) One more point. Grants without any option probably should be prohibited as useless. But this is for a new thread. -- Pavel Luzanov Postgres Professional: https://postgrespro.com