Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rx38g-0064lh-Uz for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 11:07:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rx38f-00Aefb-29 for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 11:07:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rx38d-00AedM-BY for pgsql-hackers@lists.postgresql.org; Wed, 17 Apr 2024 11:07:40 +0000 Received: from wfhigh1-smtp.messagingengine.com ([64.147.123.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rx38W-001RV0-NY for pgsql-hackers@postgresql.org; Wed, 17 Apr 2024 11:07:38 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 63E351800111; Wed, 17 Apr 2024 07:07:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 17 Apr 2024 07:07:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1713352047; x=1713438447; bh=U6moZNJIPK gQgh5LcYsGCGn7U9jLRdG5PfX3JX+cu8o=; b=efCxUKMXgTP2m7mvO7D9Zshtf6 pRUzs1HDt34VIsSyV7VByKoke09BNnyKzWSMTD8fVnYUUGShANXPVa+3a7uy373P gk0qsv2uuhbi7ZGd9+iA/fLgk+h8turwDo4561oVLhDFVPyVmyUXikE1DG7xhycv BQ1ga8lAMT4AKu7zC9JRh9KZ4vanomkKF90fOdoTFWmnpL5iq/b1lF/8wRjN5HpG SC7SlMZd/w/m/YF2IOoS+AatAh7Y7in2EfvPERxJBNBF+HBtvqDMlnePBu6qu5SB fxkXhWou5Au1QQVdktYX88/NTgDT76E/viUgCbSUYwj2lHpdmxOMlEmNNu9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1713352047; x=1713438447; bh=U6moZNJIPKgQgh5LcYsGCGn7U9jL RdG5PfX3JX+cu8o=; b=gUzzubc0qqIhinI7uzWR7Sa8xPrjOEKERdyDE6jwOPHR DM/ZrAS7j6COjEdrEOrf/WC7ncWjNbXHxdYBQ5g4O9QITs0a9brHtfd/RSuP5oQp l5hvLDgcIygBtCkrVVevqX8Q3boIdm6icuXDPD+emcLXgzzgXlacOWa+iIbKrk/0 dowUoT/2Pdjbp4ITG3pHanr3JVLEPP1AZn+sEdevpJaiodnEVJ8Ihf2T4or5Gi3y zkVbtyAtLWTV3seWWXHjYfVmCngFLX4r80KAzPp0cixzGxwgTDKQ5YS3h8jOUS1U jSTnTBQAFp1UnHOiFNeA++p6SuZEOP2mqueP9zljww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejkedgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufhffjgfkfgggtgesthdtredttderjeenucfhrhhomhepffgrghhf ihhnnhcukfhlmhgrrhhiucforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrih drohhrgheqnecuggftrfgrthhtvghrnhepkeeljeeufefhffekhfektdefleeuvdeiiefh heeffeefgeegudffudehjeejiefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrgh X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Apr 2024 07:07:26 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Andres Freund Cc: Tom Lane , Andrew Dunstan , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: documentation structure References: <20240416182310.2j6g5fqqcwi4s6wm@awork3.anarazel.de> <1355791.1713294332@sss.pgh.pa.us> <20240416201700.wyz7ojp3fr7222xt@awork3.anarazel.de> Date: Wed, 17 Apr 2024 12:07:24 +0100 In-Reply-To: <20240416201700.wyz7ojp3fr7222xt@awork3.anarazel.de> (Andres Freund's message of "Tue, 16 Apr 2024 13:17:00 -0700") Message-ID: <87v84gi6xf.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > Definitely shouldn't be the same in all cases, but I think there's a decent > number of cases where they can be the same. The differences between the two is > often minimal today. > > Entirely randomly chosen example: > > { oid => '2825', > descr => 'slope of the least-squares-fit linear equation determined by the (X, Y) pairs', > proname => 'regr_slope', prokind => 'a', proisstrict => 'f', > prorettype => 'float8', proargtypes => 'float8 float8', > prosrc => 'aggregate_dummy' }, > > and > > > > > regression slope > > > regr_slope > > regr_slope ( Y double precision, X double precision ) > double precision > > > Computes the slope of the least-squares-fit linear equation determined > by the (X, Y) > pairs. > > Yes > > > > The description is quite similar, the pg_proc entry lacks argument names. > > >> This sounds to me like it would be a painful exercise with not a >> lot of benefit in the end. > > I think the manual work for writing signatures in sgml is not insignificant, > nor is the volume of sgml for them. Manually maintaining the signatures makes > it impractical to significantly improve the presentation - which I don't think > is all that great today. And it's very inconsistent. For example, some functions use tags for optional parameters, others use square brackets, and some use VARIADIC to indicate variadic parameters, others use ellipses (sometimes in tags or brackets). > And the lack of argument names in the pg_proc entries is occasionally fairly > annoying, because a \df+ doesn't provide enough information to use functions. I was also annoyed by this the other day (specifically wrt. the boolean arguments to pg_ls_dir), and started whipping up a Perl script to parse func.sgml and generate missing proargnames values for pg_proc.dat, which is how I discovered the above. The script currently has a pile of hacky regexes to cope with that, so I'd be happy to submit a doc patch to turn it into actual markup to get rid of that, if people think that's a worhtwhile use of time and won't clash with any other plans for the documentation. > It'd also be quite useful if clients could render more of the documentation > for functions. People are used to language servers providing full > documentation for functions etc... A more user-friendly version of \df+ (maybe spelled \hf, for symmetry with \h for commands?) would certainly be nice. > Greetings, > > Andres Freund - ilmari