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 1jsujH-0003Bj-TM for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2020 21:02:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jsujD-0008LD-MY for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2020 21:02:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jsujD-0008L5-Ai for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2020 21:02:11 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jsuj9-0007FI-QR for pgsql-hackers@postgresql.org; Tue, 07 Jul 2020 21:02:10 +0000 Received: by mail-qk1-x742.google.com with SMTP id l6so39556124qkc.6 for ; Tue, 07 Jul 2020 14:02:07 -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=WvRsud5IRr6EaGwY9JwQVIF8Q12REK/RFTnHwDdduFE=; b=qEOuUZTD4SQeXSbPk1jsgcBuBL69XdaQoz2A+gbZYCbAPH1/YxOK/L/kVCOJQ/g8Rg RgLeAlqysRneWNB25PCCeDy3wFuyvbXzmUD9j1adJmb4gFC4n7evcB6TJWh4yzTQbBJU LFw5cfSsNI4ZuPq4/YyBGFHwA8K+ltdqxPTAdGNsZfw7EiVcnKjELWIXT4OjlY37+g0W IsD/Gp9sTaavfDzsdiJcMWDa+9+yJvumHcFry/DZv6tQBrt/sq1i2ElhrCiPwZ/Mw08K e74zyxUoWuBMtV7IIirgXnxgdIdrI7jXzyhjZZFsRIDEiWztnhJuqeyVbdqpwMHoOFpn mppg== 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=WvRsud5IRr6EaGwY9JwQVIF8Q12REK/RFTnHwDdduFE=; b=ju4GCaeHlvOu5xDBuPhjAXbNhtDBIISh6u13whThumtBBw2nRw7BaesX9a6XNlUDXI ZbQn6eawIef0E0F9OrtvhqU22JYfhMqlpua6Op0JSWjDA8/hm0s8PM0xV+mqGNHqWJLO ovxL+BHnCEJn2kVxZCCCwUJj3T3XBMzC2suYAIZMrEOWJinovWzdw1ibTnU5a62GbS4e A75iMekc9jhs4MXsOtkZaRuJq3oa8N/1gUSSj1Qc/VsgoGmsYcz/oqCd+UYUy41mj6tF 9wN3is66SoyX5k0fw5GDl9Khh5S9D4eLDKiC7aF1chpw8HoatKVyZHigvB1V324DOgRu WtOA== X-Gm-Message-State: AOAM533ytyFRWLnJiQEIgTefKgEcAvLdR7Eo8wKr1GkZ3CNP1H852fVP q0pQN74zfib1KLlyS9qqL2nO0w== X-Google-Smtp-Source: ABdhPJzJim48imu5Ww8GvXPqVAsisWSkbFKELgoSpYbBudJAdMsUpaEUet9pzFxD00nA56dI3UdfzA== X-Received: by 2002:a05:620a:65a:: with SMTP id a26mr52335072qka.290.1594155725196; Tue, 07 Jul 2020 14:02:05 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id r185sm25721263qkb.39.2020.07.07.14.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 14:02:04 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C815E2A3E31; Tue, 7 Jul 2020 17:02:02 -0400 (-04) Date: Tue, 7 Jul 2020 17:02:02 -0400 From: Alvaro Herrera To: Tom Lane Cc: Peter Eisentraut , pgsql-hackers , Sergey Cherkashin , Nikita Glukhov , Alexander Korotkov Subject: Re: output columns of \dAo and \dAp Message-ID: <20200707210202.GA27355@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1698998.1591479248@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Sergey, Nikita, Alexander, if you can please see this thread and propose a solution, that'd be very welcome. On 2020-Jun-06, Tom Lane wrote: > Peter Eisentraut writes: > > I'm also wondering whether this is fully correct. Would it be possible for the > > argument types of the operator/function to differ from the left arg/right arg > > types? (Perhaps binary compatible?) > > pg_amop.h specifies that > > * The primary key for this table is * amopstrategy>. amoplefttype and amoprighttype are just copies of the > * operator's oprleft/oprright, ie its declared input data types. > > Perhaps it'd be a good idea for opr_sanity.sql to verify that, since > it'd be an easy thing to mess up in handmade pg_amop entries. But > at least for the foreseeable future, there's no reason for \dAo to show > amoplefttype/amoprighttype separately. > > I agree that \dAo ought to be showing amopstrategy; moreover that ought > to be much higher in the sort key than it is. Also, if we're not going > to show amoppurpose, then the view probably ought to hide non-search > operators altogether. It is REALLY misleading to not distinguish search > and ordering operators. > > The situation is different for pg_amproc: if you look for discrepancies > you will find plenty, since in many cases a support function's signature > has little to do with what types it is registered under. Perhaps it'd be > worthwhile for \dAp to show the functions as regprocedure in addition to > showing amproclefttype/amprocrighttype explicitly. In any case, I think > it's rather misleading for \dAp to label amproclefttype/amprocrighttype as > "Left arg type" and "Right arg type", because for almost everything except > btree/hash, that's not what the support function's arguments actually are. > Perhaps names along the lines of "Registered left type" and "Registered > right type" would put readers in a better frame of mind to understand > the entries. > > regards, tom lane > > -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services