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 1mV38a-0006Ty-AL for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Sep 2021 02:46:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mV38X-00052D-Q4 for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Sep 2021 02:46:29 +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 1mV38X-000524-IK for pgsql-hackers@lists.postgresql.org; Tue, 28 Sep 2021 02:46:29 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mV38R-0005k3-1l for pgsql-hackers@postgresql.org; Tue, 28 Sep 2021 02:46:28 +0000 Received: by mail-il1-x12c.google.com with SMTP id k13so6347159ilo.7 for ; Mon, 27 Sep 2021 19:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2XAzo4+TL0ojzWGYI1sa8c9RlSpyybY+opwUbcODC3k=; b=vCAgf1OyLdlh1Lvn0M+oz7Jbs8MM49cA8r07zny6QyVP6DFaPJuQlZP+PZWgo2o3gj nAiv1VMfvXMUZRJwREVfnu5X0iCgWOPXQH2SmreM2dtHEOS8hiR8hgUVDe1ji6WqIrMw CNh2ZX9iFNnM903UGRQ9uY556GXBv+/0tyQ5S5rUOZs7F+rvyA0NL8DryNuqd19FjSUj yyucE8KnD9aJSSgHavDBRjPI/JfB4oBlXobsHk3lq8V0Nn1N644WwF7Y3PgfoeMhKbuv 4i2P/x8dckVzJoHFmU0TcQ81PQ0onvsJHAf5yaIzcwRI3zmgWmJlJTTl9K7Iq3p0kw2q 0bKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2XAzo4+TL0ojzWGYI1sa8c9RlSpyybY+opwUbcODC3k=; b=DwVQT3fzaff/KmLE6XIUobV/aKUkkTVOH0FLqj1QU46fYGEOGv54n6gIb/2boEbTBx iEjFXGNY8wD3zARulpDFujtavEYXJBy7rNbuCL7JETpPjQmlcF2HW21Li4ydON4Y1M1G dKkHJlapWaoUO7BCybkSZVZiNB+siYoLw9cUH+F+FBB4RMYfxeLar0D2MrAB112rLYFu 646mVVdLuOeLcrb1s+EMnTPs1svA+oT9LPvx4sEIllwEkxxr2zhmK4cUvy3LbBsOOsp+ VyqAOvyNd7JDsDJNZBqdrRLsFy+b4xex/KFnB1zbD06KYQOE1FF+jJ4MMLRvxMEFt6gb jMvw== X-Gm-Message-State: AOAM530TfsfzfBGZpETEoC809zL6iEnq3kik5Zbf4fw7oc/r62l0Xyp3 jEPP8mHAnzP0ASasEVJIDVzqlA== X-Google-Smtp-Source: ABdhPJz+0SkLdYI+XvTHz20hG97HDo2imHwLDpoDycl6+yEsgjnqB1r1j9na7tNir4IUSw0owvGVuQ== X-Received: by 2002:a05:6e02:1a0b:: with SMTP id s11mr2544481ild.65.1632797182111; Mon, 27 Sep 2021 19:46:22 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id i5sm10600109ilj.49.2021.09.27.19.46.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Sep 2021 19:46:21 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 41B75800B42; Mon, 27 Sep 2021 21:46:20 -0500 (CDT) Date: Mon, 27 Sep 2021 21:46:20 -0500 From: Justin Pryzby To: Pavel Stehule Cc: Laurenz Albe , Ian Lawrence Barwick , pgsql-hackers@postgresql.org, Gilles Darold Subject: Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs) Message-ID: <20210928024620.GO831@telsasoft.com> References: <20210714030725.GG9600@telsasoft.com> <2c5c19ffe1a812223b2d60b1248ef31e8b51caaa.camel@cybertec.at> <20210716011639.GK20208@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Sep 17, 2021 at 12:05:04PM +0200, Pavel Stehule wrote: > I can live with the proposed patch, and I understand why ++ was > introduced. But I am still not sure it is really user friendly. I prefer to > extend \dA and \dn with some columns (\dA has only two columns and \dn has > two columns too), and then we don't need special ++ variants for sizes. > Using three levels of detail looks not too practical (more when the basic > reports \dA and \dn) are really very simple). You're suggesting to include the ACL+description in \dn and handler+description and \dA. Another option is to add pg_schema_size() and pg_am_size() without shortcuts in psql. That would avoid showing a potentially huge ACL when all one wants is the schema size, and would serve my purposes well enough to write | SELECT pg_namespace_size(oid), nspname FROM pg_namespace ORDER BY 1 DESC LIMIT 9; -- Justin