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 1rx94w-006dIA-3n for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 17:28:14 +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 1rx94u-00DK14-Lg for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 17:28:12 +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 1rx94u-00DJy4-Bv for pgsql-hackers@lists.postgresql.org; Wed, 17 Apr 2024 17:28:12 +0000 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rx94n-001Uer-UY for pgsql-hackers@postgresql.org; Wed, 17 Apr 2024 17:28:11 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id E5E021380155; Wed, 17 Apr 2024 13:28:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Apr 2024 13:28:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding: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=fm3; t=1713374884; x=1713461284; bh=Eb2qWZyrNnUhlQ9oKPrlIKChrssEQ2fjD9aBaGbk+FI=; b= b8fFDuOBIPoeAslweu7fRlWnffLRKXwTDM2aZZFs+7V3MAR1WxKaekZssireXGsG E3g4uGnIlgC4U8Tq5vcYLo2DZ0hkTyI8N3XGHVvALq6byGwMeu02bwP0oyvzv2hw Lmj2c6aD6l2G27ojvPalaYCK6NR50p8kswPxB4XyJX0mUk0VqublXha5UmvwDnL7 nSbzEecyCGeJBHTCBvJZbsZeNDoRA1QndwMFHyjSboMJee5hHO/852k4ddM9OrBV qF5dJpm+vCvKg3hPKVxI2//ReifJoWb78FdIFHNsB/fDUs9iDKb+dfjbGhN+/zj8 76vvYt3oviCF15D4ljv2bw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1713374884; x= 1713461284; bh=Eb2qWZyrNnUhlQ9oKPrlIKChrssEQ2fjD9aBaGbk+FI=; b=V 0TEnjHv1yLxMF4qpT0wz+A1XCLe4jsqYmb8BDZ5vYZU/dNM86GYMOXB8hpP0c83J Y+uvbmuuXf9fDLzZKcN2qrqrbUyaeZ85k8cpLfetvBM6bg72yvlEL8jZTGzt3MsU 9tgyndbSK5UdGWP/pY/sIlBis2v5JJE2ELZFJM6Z/z0LA8cuaI5JUW1dujtt9vtl He7Mf5y6kqMchvpcfl9ccBjosc7U2B3g1qwV0+alg26MikqlGpC6t2DexiIpt/1E X0LaP2/qnrOL8qjj/xyfbPnAB3xJK8G9jf3rlh6dO263fevyWKfFOJ2kM1kuTpSr VkrlSHL9PzibIZsuwvNIw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejkedguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtudenucfhrhhomheptehn ughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecugg ftrfgrthhtvghrnhepuddtieegleejheeujeeiveegueelhfekleeuffdukeduleduffeh fffgteeivefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Apr 2024 13:28:04 -0400 (EDT) Date: Wed, 17 Apr 2024 10:28:03 -0700 From: Andres Freund To: Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= Cc: Tom Lane , Andrew Dunstan , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: documentation structure Message-ID: <20240417172803.3xzcipouw74unuen@awork3.anarazel.de> References: <20240416182310.2j6g5fqqcwi4s6wm@awork3.anarazel.de> <1355791.1713294332@sss.pgh.pa.us> <20240416201700.wyz7ojp3fr7222xt@awork3.anarazel.de> <87v84gi6xf.fsf@wibble.ilmari.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87v84gi6xf.fsf@wibble.ilmari.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2024-04-17 12:07:24 +0100, Dagfinn Ilmari Mannsåker wrote: > Andres Freund writes: > > 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). That seems almost inevitably the outcome of many people having to manually infer the recommended semantics, for writing something boring but nontrivial, from a 30k line file. > > 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), My bane is regexp_match et al, I have given up on remembering the argument order. > 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. Nice. > 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. I guess it's a bit hard to say without knowing how voluminious the changes would be. If we end up rewriting the whole file the tradeoff is less clear than if it's a dozen inconsistent entries. > > 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. Indeed. Greetings, Andres Freund