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 1rxRoJ-008jtR-Cj for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 13:28:19 +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 1rxRoG-004uVv-Ju for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 13:28:16 +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 1rxRoG-004uVm-AL for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 13:28:16 +0000 Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rxRoE-001dKM-5E for pgsql-hackers@postgresql.org; Thu, 18 Apr 2024 13:28:15 +0000 Received: by mail-ua1-x92f.google.com with SMTP id a1e0cc1a2514c-7e80c1b25b7so261029241.0 for ; Thu, 18 Apr 2024 06:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713446892; x=1714051692; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1K5wsYk/1SxU2RlAhCcD4TrmnZnMnt9BKRcC/gjutfo=; b=mfuML5dXVqvLE1lOC27qoGuo17e5pabCyo7vyuG3Kj8dDaGDyLemzKM0LtD+IXM6Vd NY65nH743q0ULt7DgwwvztdI6xT0egRA1okwq0/i9mQDf+XOxEzEgzOSl5mObdBGXcCv WrojYGR56aGv/yI1pMqSSpwKM2t26+EjSoNoAOpdQN0HSBcchOoaWz2XiGWadSsvB9Du E1+AWQusmhYAn4y6FaTARQdUwCzwvVey+RK/O2iCetQRqKxs72snQ/rdZmhih1PPb6kG GJAFKzpLKxoDFPfTW478w+E+nqS9Way4d7uA2BCBS1ZfRmVR7b4js7DAWNxdy9Ds9tEI 1Bcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713446892; x=1714051692; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1K5wsYk/1SxU2RlAhCcD4TrmnZnMnt9BKRcC/gjutfo=; b=bsFQ7/avtoqrJtCWoYEMPc7yF2ITzNjBaQYDRR5oiLBAQgX8uvdvmID3KyTFS00zXf pdEXIe+2Z9GfrBDcslwNXTIFI9hDpgBYrTusos5diiSHW/7sp7sQn3xM00iQ3F3j7x// ZEvcXTRIqco5Zf1pa27NE0jOqLk/CzhZ/UePgnuSlTLeNrl7XQLfBfEUGhGy1+OVWxtV CS+Oaez4MTvftQlAvumniUemVqmW2C+qF6kEJufC9NhQPouttDTi2TE3qfnLVH2ocxlQ /fIcXKjhTo5qxQiLH31RASrc+nTe8fCtAK8fjZFn+6SMexNElgeJs3yqQEC3eVypxCv/ XcYg== X-Forwarded-Encrypted: i=1; AJvYcCUdE2EphURBzzM4h+6l3n40+yHJ3lt0XxTEpVy798U6WzYWO3df6uNzYlbUQg2aZR3W2/W/Sdl3cEb2eOlWvJxNb3WxY53xScyZK3TK X-Gm-Message-State: AOJu0Yy6J+IeaTg9kWTFWieRUfPd8Fj+WpkBfsN4FTHHliAg9fvi1IMJ 3aE4gT6Llh14iLOXHINvH4CgHoIiYkeiuZHMi54NSOdndxJYlXMI/L4n7DvaAmZb9kc/NrnSkow 74+RF/qiVA648vJKw/ybJ41q57bA= X-Google-Smtp-Source: AGHT+IGgtV3P8Ygj/naEUHzxokgqeOaORHmbuA3E/TSFoMuH3OZO8suXebnuotbl61Caa/Cr9u22UHLxHx8f3obLi5E= X-Received: by 2002:a05:6122:3189:b0:4d4:3fa5:e19e with SMTP id ch9-20020a056122318900b004d43fa5e19emr3166333vkb.2.1713446891477; Thu, 18 Apr 2024 06:28:11 -0700 (PDT) MIME-Version: 1.0 References: <20240416182310.2j6g5fqqcwi4s6wm@awork3.anarazel.de> <1355791.1713294332@sss.pgh.pa.us> <20240416201700.wyz7ojp3fr7222xt@awork3.anarazel.de> <87v84gi6xf.fsf@wibble.ilmari.org> <20240417172803.3xzcipouw74unuen@awork3.anarazel.de> <87sezjj0ny.fsf@wibble.ilmari.org> In-Reply-To: <87sezjj0ny.fsf@wibble.ilmari.org> From: jian he Date: Thu, 18 Apr 2024 21:28:00 +0800 Message-ID: Subject: Re: documentation structure To: =?UTF-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= Cc: Andres Freund , Tom Lane , Andrew Dunstan , Robert Haas , "pgsql-hackers@postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 18, 2024 at 2:37=E2=80=AFAM Dagfinn Ilmari Manns=C3=A5ker wrote: > > Andres Freund writes: > > > Hi, > > > > On 2024-04-17 12:07:24 +0100, Dagfinn Ilmari Manns=C3=A5ker wrote: > >> Andres Freund writes: > >> > I think the manual work for writing signatures in sgml is not insign= ificant, > >> > nor is the volume of sgml for them. Manually maintaining the signatu= res makes > >> > it impractical to significantly improve the presentation - which I d= on'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 us= e > >> ellipses (sometimes in tags or brackets). > > > > That seems almost inevitably the outcome of many people having to manua= lly > > infer the recommended semantics, for writing something boring but nontr= ivial, > > from a 30k line file. > > As Corey mentioned elsethread, having a markup style guide (maybe a > comment at the top of the file?) would be nice. > > >> > And the lack of argument names in the pg_proc entries is occasionall= y fairly > >> > annoying, because a \df+ doesn't provide enough information to use f= unctions. > >> > >> I was also annoyed by this the other day (specifically wrt. the boolea= n > >> arguments to pg_ls_dir), > > > > My bane is regexp_match et al, I have given up on remembering the argum= ent > > order. > > There's a thread elsewhere about those specifically, but I can't be > bothered to find the link right now. > > >> 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 chan= ges > > would be. If we end up rewriting the whole file the tradeoff is less cl= ear > > than if it's a dozen inconsistent entries. > > It turned out to not be that many that used [] for optional parameters, > see the attached patch. > hi. I manually checked the html output. It looks good to me.