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 1nfUjn-0000IJ-HK for pgsql-general@arkaria.postgresql.org; Fri, 15 Apr 2022 22:48:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nfUjm-0006hO-2w for pgsql-general@arkaria.postgresql.org; Fri, 15 Apr 2022 22:48:22 +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 1nfUjl-0006hF-OL for pgsql-general@lists.postgresql.org; Fri, 15 Apr 2022 22:48:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfUjk-0005Yn-HD for pgsql-general@postgresql.org; Fri, 15 Apr 2022 22:48:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 23FMmFED1837007; Fri, 15 Apr 2022 18:48:15 -0400 From: Tom Lane To: "David G. Johnston" cc: Rob Sargent , Adrian Klaver , "pgsql-general@postgresql.org" Subject: Re: function defined (or not), more worries on version 10->14 upgrade In-reply-to: References: <1c00b419-2507-f018-3579-2529ed8d6de5@gmail.com> <1653697.1650042859@sss.pgh.pa.us> <44d8ca64-af6a-6ff8-1a6a-e19d8f75885c@aklaver.com> <4100be2d-7fa3-8aec-2a49-7702b7249581@gmail.com> <08b7dc99-c3e4-7da0-b9f1-5c4587626c0d@gmail.com> Comments: In-reply-to "David G. Johnston" message dated "Fri, 15 Apr 2022 15:36:16 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1837005.1650062895.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Apr 2022 18:48:15 -0400 Message-ID: <1837006.1650062895@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > ... And if I know something exists > in the DB and I want details, doing a name-only search followed by \sf > seems like it would work well enough. It could work better though. For example, regression=3D# \df *backup* List o= f functions Schema | Name | Result data type | = Argument data types | = Type = ------------+-----------------+------------------+------------------------= ------------------------------------------------------------------------+-= ----- pg_catalog | pg_backup_start | pg_lsn | label text, fast boolea= n DEFAULT false | = func pg_catalog | pg_backup_stop | record | wait_for_archive boolea= n DEFAULT true, OUT lsn pg_lsn, OUT labelfile text, OUT spcmapfile text | = func (2 rows) regression=3D# \sf pg_backup_start (label text, fast boolean DEFAULT false= ) ERROR: syntax error at or near "text" It seems annoying that I can't copy-and-paste \df's output to invoke \sf. Moreover, once I peel that down to what will work: regression=3D# \sf pg_backup_start (text, boolean ) CREATE OR REPLACE FUNCTION pg_catalog.pg_backup_start(label text, fast boo= lean DEFAULT false) RETURNS pg_lsn LANGUAGE internal PARALLEL RESTRICTED STRICT AS $function$pg_backup_start$function$ it's apparent that \sf isn't even consistent with *itself*. So I agree that there's room for some polishing here. I'm not sure how far we can go without breaking backwards compatibility. OTOH, it looks like \df's ability to consider parameters at all is new as of v14, so maybe the details don't have a huge constituency yet. regards, tom lane