Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iu25e-00020z-AT for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jan 2020 22:33:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iu25b-0002Ek-HK for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jan 2020 22:33:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iu25b-0002Ed-5T for pgsql-hackers@lists.postgresql.org; Tue, 21 Jan 2020 22:33:39 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iu25Y-0001Jf-CT for pgsql-hackers@postgresql.org; Tue, 21 Jan 2020 22:33:38 +0000 Received: by mail-qt1-x841.google.com with SMTP id k40so4072812qtk.8 for ; Tue, 21 Jan 2020 14:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=mKrVzwGfGZQ5NEtu2g7ZPa/LdD3aRUB6i/ZAHCM5+BI=; b=D2A813j5FDVUI7SNJ419ZujWaImiC4otwlk0xnmM2NT7k6FGmGwnZtT4Tmr7jzGdWT S7skZxdJZTmOeKfcigeRCxUwKdVQyF9/27UsxK/cPJMFlwZtNbej8MwkAYVh1wHJR7AK ERDYNRUUQTnwILtqBrAQY9HF7IIZMX1BnpGXD6jizJeOiusrzlOlyWibFXgw1d/y2ise 02ay5EiyRBRTKpIFstc8o7P+L3vns5tfxVNSnkccTbzWAzG0fZpm+HUKc1vnRmRY0+47 HGbA4DNokgV35u2LV9eutHZiJN/5/MkMZGpKTpBVR+qL713sPyKkjU6rgzPAf2/wZDXk YN0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mKrVzwGfGZQ5NEtu2g7ZPa/LdD3aRUB6i/ZAHCM5+BI=; b=IGVjufnz+91cGla2lP2nMxKjNFqVL8mn6Oh6IuaR/pTmaR5LI4oUxFW7/FR3NvD2RJ OF55h/qUP0BtpiAUN+2Z+bgROiA7dtleppBeXGR3AL2+7j7A7iD7ujbcm4fUQbXB/VuL VARd/XKk3woKKDCTb2FAll/cQGf4NzHTacgPy5QRYb4tyvgBSN/T/dusR7+0NWg5GN/m DTkgRmrGizL3c4XNKiIHUiwik4HhbJ5GDcliiRH6h/lAJDx9hfRDgdLb5s8Wjn4Dw/9s vzrNkTAud+xmPEaL31DdJJgihyTkA/Wo2qSjgk0fZyi/fzd4om4okDzdNlxlIJRMynAz f4Vg== X-Gm-Message-State: APjAAAWzwh8tbejV2uPTORlid9g3WfvBZBY3zWTfmiJ8wkbS5YLaEE9d LCN8xGD2ywpgyfM6IhDvDTDeAg== X-Google-Smtp-Source: APXvYqzrvbWZE4gRo/TcIM+HEm8dTqzlXvRoHT6lTbnpYaddpkDYYtgC+5/sq7ioJ97uhzANyz9XSg== X-Received: by 2002:ac8:2afb:: with SMTP id c56mr7281003qta.112.1579646015431; Tue, 21 Jan 2020 14:33:35 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([199.229.249.199]) by smtp.gmail.com with ESMTPSA id d26sm17704914qka.28.2020.01.21.14.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 14:33:34 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 8F76A30081C; Tue, 21 Jan 2020 19:33:29 -0300 (-03) Date: Tue, 21 Jan 2020 19:33:29 -0300 From: Alvaro Herrera To: Alexander Korotkov Cc: Michael Paquier , Andres Freund , Nikita Glukhov , Thomas Munro , pgsql-hackers , Kyotaro HORIGUCHI , David Steele Subject: Re: Psql patch to show access methods info Message-ID: <20200121223329.GA18317@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I think I would like this feature to be in, but I'm not sure that the shape is final yet. My points: a) I don't see any use for \dA as presented; I think the \dA+ output is useful. Therefore my preference would be that \dA presents what the latest patch has as \dA+. I think we should leave \dA+ unimplemented for now; maybe we can use some use for it later on. b) I think \dAp should list the function used for each support proc. I don't have any use for \dAp actually (I already said that upthread, sorry for repeating myself), but I think that if we have it, then showing only the proc number is pointless. c) it would be damn handy if \dAf (maybe \dAf+) lists the datatypes that each opfamily has opclasses for. Maybe make the output an array, like {int4,int8,numeric,...} Something like [*] but somehow make it prettier? d) This one I'm unsure about: should we list the opfamily for each opclass in \dAc? I'm not sure whether it's useful for anything. [*] SELECT DISTINCT am.amname AS "AM", CASE WHEN pg_catalog.pg_opfamily_is_visible(f.oid) THEN format('%I', f.opfname) ELSE format('%I.%I', n.nspname, f.opfname) END AS "Operator family", string_agg(format_type(c.opcintype, -1), ', ') as "Applicable types", pg_catalog.pg_get_userbyid(f.opfowner) AS "Owner" FROM pg_catalog.pg_opfamily f LEFT JOIN pg_catalog.pg_am am on am.oid = f.opfmethod LEFT JOIN pg_catalog.pg_namespace n ON n.oid = f.opfnamespace left join pg_catalog.pg_opclass c on (f.oid = c.opcfamily) group by 1, 2, 4 ORDER BY 1, 2; -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services