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 1rwpEu-004PWH-Vp for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Apr 2024 20:17:13 +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 1rwpEt-006Cjx-Bg for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Apr 2024 20:17:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rwpEr-006Cjb-Ip for pgsql-hackers@lists.postgresql.org; Tue, 16 Apr 2024 20:17:11 +0000 Received: from wfhigh8-smtp.messagingengine.com ([64.147.123.159]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rwpEo-003BU5-A8 for pgsql-hackers@postgresql.org; Tue, 16 Apr 2024 20:17:08 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.west.internal (Postfix) with ESMTP id A51091800181; Tue, 16 Apr 2024 16:17:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 16 Apr 2024 16:17:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=1713298622; x=1713385022; bh=ZlFgQvp8nL zMfqlBOF2Ib9NlyXqV7TPCpgKDpMVI9yY=; b=V2rS82xLYBOSTCu3C3pYA+QKho JlDUJ/EjYK9AI5xWwiGmo3j5FwYNmfdLZLVBTuPVTtWNaOHu3mQwQJ4Juj9eT2bp uXgsLymb/i8BmbL1/fKr7k7D+WoMDEHOzgyF0AaTAh8cTKh/6E/ZeHVr9jE8pdmj XyDhu1LPp+gUIkPA1/E4qmiHsGZtChkavbb5la9kOIALhJsaYxDuyizLOgTSiOm2 NVRVxu/+528BaE48auqfu48XbAYy3nt19073HG6129QR2TYTdGdccnJ04RaOnsnV kGnm8RckLek6irEXjR5lTcAZjL8VhJAo+04MnaoamHgkH1W6so7B2tYd7uBw== 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= fm2; t=1713298622; x=1713385022; bh=ZlFgQvp8nLzMfqlBOF2Ib9NlyXqV 7TPCpgKDpMVI9yY=; b=DrPST0O+R30a85Y1lboPhH7Bhb18gMjv9+jUxdBmBv7N dTisws4ebqKFFLD78NXCXdPMMVBDjtIFsSEvaWNrSV/uL4+zyYRgoBXFS8vqJnKr PFrj6AQrZruf7+QzLT80RrdERbkParRIp3hLQQQQPeZ+QSNodQIRvrodjnUV44+h 7Ti4O0GzCc7/5MB32/R5WtIKmSrK9WQnDnNTvUsPwpb85wqMaqLab+1GZkXzFo9D mLNWQ8bhvYmbbPugPw9YPImcdGc5WembYuEphmjapVmV/bO3zsTTPIJc+3qpn6AY E6qoZkmWHNA8jhS07huCgia6FZYUynw7gfG+76sAMQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejiedgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Apr 2024 16:17:01 -0400 (EDT) Date: Tue, 16 Apr 2024 13:17:00 -0700 From: Andres Freund To: Tom Lane Cc: Andrew Dunstan , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: documentation structure Message-ID: <20240416201700.wyz7ojp3fr7222xt@awork3.anarazel.de> References: <20240416182310.2j6g5fqqcwi4s6wm@awork3.anarazel.de> <1355791.1713294332@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1355791.1713294332@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2024-04-16 15:05:32 -0400, Tom Lane wrote: > Andres Freund writes: > > I think we should work on generating a lot of func.sgml. Particularly the > > signature etc should just come from pg_proc.dat, it's pointlessly painful to > > generate that by hand. And for a lot of the functions we should probably move > > the existing func.sgml comments to the description in pg_proc.dat. > > Where are you going to get the examples and text descriptions from? I think there's a few different way to do that. E.g. having long_desc, example fields in pg_proc.dat. Or having examples and description in a separate file and "enriching" that with auto-generated function signatures. > (And no, I don't agree that the pg_description string should match > what's in the docs. The description string has to be a short > one-liner in just about every case.) 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 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. 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... Greetings, Andres Freund