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 1qz5wx-00DTjz-Ba for pgsql-general@arkaria.postgresql.org; Sat, 04 Nov 2023 01:59:47 +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 1qz5wv-0048HI-Mr for pgsql-general@arkaria.postgresql.org; Sat, 04 Nov 2023 01:59:45 +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 1qz5wv-0048H8-7s for pgsql-general@lists.postgresql.org; Sat, 04 Nov 2023 01:59:45 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qz5wq-003qyh-Ht for pgsql-general@lists.postgresql.org; Sat, 04 Nov 2023 01:59:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=B7K8wmiz0Gt1tkqbg612GpnkzdRpL3E9rRY7o5ZemY0=; b=Ntqa3 +9+m97VhE4Fut0pMFR6DhE324N6CJHWmcfUvF0VS8nrv+/M/55NfZGGQMqZGPNq9hSLgwJURHmJ50 LCeZiaHyvy1SGCk8Fe4Twx5tOx/rAMsYF+f+m1cFuOPan77dnkZSWyV6HJOkDt7glYVrdzdCGZWVG WZftThAx4cN+YcJzVxvns+CLM1tdDdSFdl7h0bJ16EuauhArIF+q2X4R69QgKhshxqnjMw4PiuQ2k U82q9gPgyIsr8QLeMAEjmyGSffUt8+Wdgwu7RArvGmdd0thPWwMMxxU8lbyh0O5rgn0KXSU7SxX6M EgAc5D7mFYUtUO6fNA7z9FtKgGcPg==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qz5wo-001SBH-2D; Fri, 03 Nov 2023 21:59:38 -0400 Date: Fri, 3 Nov 2023 21:59:38 -0400 From: Bruce Momjian To: Tom Lane Cc: Ben Hancock , pgsql-general@lists.postgresql.org Subject: Re: Local postgres manual Message-ID: References: <2ad88fa8-e0c7-b678-232b-30af59448133@benghancock.com> <3333527.1699041485@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3333527.1699041485@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Nov 3, 2023 at 03:58:05PM -0400, Tom Lane wrote: > Ben Hancock writes: > > I will say that, as the manual is quite large, a local GNU Info version > > would be great to be able to traverse different sections, etc, more > > easily. If that doesn't exist already, I wonder if a tool like `pandoc` > > could be employed to generate that. > > That's exactly what the postgres.txt file Bruce mentioned is. > > # single-page text > postgres.txt: postgres.html > $(PANDOC) -t plain -o $@ $< > > These variant doc forms aren't terribly well (or at all) documented, > but the doc/src/sgml Makefile knows how to create a number of them. I tried: pandoc -t texinfo -o postgresql.info postgres.html but couldn't figure out how to access it via 'info'. I was able to get the man page looking good with: make postgres.html && pandoc -t man -o postgresql.1 postgres.html && sed -n '1,${p;/^\.SH "NAME"/q}' /u/postgres/man/man1/postgres.1 | sed 's/POSTGRES/POSTGRESQL/' > /u/postgres/man/man1/postgresql.1 && cat postgresql.1 >> /u/postgres/man/man1/postgresql.1 && rm postgresql.1 I pulled the formatting from postgres.1; without that the formatting was 80-column and poor. I think it doesn't define .TH and that makes it look bad. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.