| From: | Bear Giles <bgiles(at)coyotesong(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Proposal: doxygen + MAN 7 pages |
| Date: | 2026-01-29 16:43:01 |
| Message-ID: | CALBNtw4FDq_tWYErCeKO3djPEu8XHU0yKRv=5ZLUcN-FBP22tg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
This started because I was looking for MAN pages for a number of functions.
They're documented on the website but there aren't MAN pages for them.
(Except SPI_*, and I don't think they're bundled in any of the
debian/ubuntu packages by default. However I would need to double check.)
Doxygen is a common approach for this - it only requires annotating code
comments that should already be there (*cough*) and can produce
Docbook/SGML in addition to manpages, HTML, Latex, etc.
But... libpq has a lot of functions, it is not clear what purpose many of
them serve, etc., so MAN 3 pages won't be enough.
Enter OpenSSL. If you look at its documentation it has a MAN 3 page for
each function, but more importantly it also has MAN 7 pages that provide
the context required to use a number of related functions. With libpq there
would be a 1-to-1 relationship between the official documentation and a MAN
7 page. (Mostly - there are some pages with a single deprecated function so
they don't need to be added.)
Each of these pages would refer to the official pages... and working sample
code.
I have a POC implementation and plan to create a PR for other people to
review later. I'm currently focused on getting some sample code to compile
but this is far enough along that a PR shouldn't take long to produce. I
wanted to give you a heads up since the man and related HTML pages should
definitely be included in libpq-dev.
......
On a similar note I saw the SPI_* pages - and the same thing applies.
Custom extensions using the API, not a PGXN wrapper, is not for the faint
hearted. But if someone is willing to take it on it would be a tremendous
help to have some MAN 7 pages that cover the required macros, palloc/pfree,
the fact that each connection/session runs in its own thread, etc.
Bear
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Florin Irion | 2026-01-29 16:45:52 | Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement |
| Previous Message | Greg Burd | 2026-01-29 16:39:34 | Re: Refactor how we form HeapTuples for CatalogTuple(Insert|Update) |