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 1jYZM3-0007cJ-KT for pgsql-hackers@arkaria.postgresql.org; Tue, 12 May 2020 18:10:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYZM2-0003OK-Ec for pgsql-hackers@arkaria.postgresql.org; Tue, 12 May 2020 18:10:10 +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 1jYZM2-0003OB-5x for pgsql-hackers@lists.postgresql.org; Tue, 12 May 2020 18:10:10 +0000 Received: from mail-qv1-xf43.google.com ([2607:f8b0:4864:20::f43]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jYZLv-0001s3-HS for pgsql-hackers@lists.postgresql.org; Tue, 12 May 2020 18:10:08 +0000 Received: by mail-qv1-xf43.google.com with SMTP id 59so6896311qva.13 for ; Tue, 12 May 2020 11:10:03 -0700 (PDT) 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=dQki55yEzblP6qjUrmX6Jy27pLoPg6a+R72nWIfC+ZA=; b=CRsldfadku1V/k4HcFzrHt9UVzcLU7XS+RbJgLpl7vgDGEjdZ4G2KpbqqY0DsToERS hHJcB9gzuHr5pdc+YdJrrO8ym2sD/TfRz6Eg1WCBZ42fsN0NBbDQTFQbRIPnJu6laGBc 3KbBmVJHxbFnTZ7v+ZIBqsy38/XjJUiQjsN84kwuX7o4Q35w1lg2TeavGAb/Pn78LAo5 /R5q4ZL9HeaJAVFkf9Oybu1L3v+xYHQTdsaJmJA8yBv4tM/UAZpHHD01CJ1vrUySuIji fWKpiLztHnY1IVCnfJIDl2ZOb7L6YKTfhvlTUV4tY+zWwMFmdeC0kziD84V7ltgGSrGY t5Sw== 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=dQki55yEzblP6qjUrmX6Jy27pLoPg6a+R72nWIfC+ZA=; b=f/3/TM1kD+tEuXwOLwuOyo3AnrIvBkZy5RzV5mfXtENTM3faozxSeD489GKJbS+p2r qcEVerD2iFAvfpC006nkIkh423DDP14Ry1jQ7vCgPPZxF9QxUBgJLA3r9MMGtdp28lMQ I2d5v1SFY9B/T88WZEQYk4e5tw9F4Y7kH366Pgayc7IU2UFUJ8so3AYDq03pVjvS9tNq n/NfFC7Js6WOVTX2QmM/8NdVWPrJ9tifiPwpWT8tWEBft0WAw1rBA4nGfS18b3s2fdHr HQkzbCoIbNy7Vv44G00dPstYBxtt1KKTJCy51dtZVGIbZQAMZmKqzDh+GVfXh4Ag5UL+ 4pLw== X-Gm-Message-State: AGi0PuaU/F2XWHpBYVJifwKtZWvTt4OQ/atGCTKel2OS5x0cQcqLVaXb ukVR3iJg8KLecKpPSYPWteWx5/wueW/mNGJda6lqOyVlM6T0FV7DeakniyBmZbWAiTBwVyQ+uL4 L/49TGutcFH+xv37IaJVD9Cz7qtEIQFVFrjUuw+0HQ9c0UXfdUXYzhAKtvrxHE0meA+wbmm1aO8 /QUifoUwjEB96WMgyt X-Google-Smtp-Source: APiQypLaBTz8xY9TeWKhQykkxjQzSB5vXivgre1KyL6Yk3fUkE6FSlBuGBpYauL82HwmJpSMyLgDkg== X-Received: by 2002:a05:6214:3a8:: with SMTP id m8mr16835207qvy.182.1589307002178; Tue, 12 May 2020 11:10:02 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id j9sm11475705qkg.88.2020.05.12.11.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 11:10:01 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id D10F53005C3; Tue, 12 May 2020 14:09:58 -0400 (-04) Date: Tue, 12 May 2020 14:09:58 -0400 From: Alvaro Herrera To: =?utf-8?B?0KHQtdGA0LPQtdC5INCn0LXRgNC60LDRiNC40L0=?= , Nikita Glukhov Cc: pgsql-hackers@lists.postgresql.org, Alexander Korotkov Subject: Re: pgsql: Show opclass and opfamily related information in psql Message-ID: <20200512180958.GA11266@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200511210856.GA18368@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I would appreciate opinions from the patch authors on this ordering change (rationale in previous email). I forgot to CC Sergei and Nikita. > diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c > index 8dca6d8bb4..9bd0bf8356 100644 > --- a/src/bin/psql/describe.c > +++ b/src/bin/psql/describe.c > @@ -6288,7 +6288,11 @@ listOpFamilyOperators(const char *access_method_pattern, > processSQLNamePattern(pset.db, &buf, family_pattern, have_where, false, > "nsf.nspname", "of.opfname", NULL, NULL); > > - appendPQExpBufferStr(&buf, "ORDER BY 1, 2, o.amopstrategy, 3;"); > + appendPQExpBufferStr(&buf, "ORDER BY 1, 2,\n" > + " o.amoplefttype = o.amoprighttype DESC,\n" > + " pg_catalog.format_type(o.amoplefttype, NULL),\n" > + " pg_catalog.format_type(o.amoprighttype, NULL),\n" > + " o.amopstrategy;"); > > res = PSQLexec(buf.data); > termPQExpBuffer(&buf); -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services