Re: Local postgres manual - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Local postgres manual
Date
Msg-id ZUWlirLLtqgIWMHa@momjian.us
Whole thread Raw
In response to Re: Local postgres manual  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Fri, Nov  3, 2023 at 03:58:05PM -0400, Tom Lane wrote:
> Ben Hancock <lists@benghancock.com> 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  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.



pgsql-general by date:

Previous
From: Thomas Boussekey
Date:
Subject: Re: Indexing fragments of a column's value ?
Next
From: Ron
Date:
Subject: Re: Postgres limitation in user management