pgsql: doc: Add some images

Started by Peter Eisentrautover 7 years ago6 messageshackerscomitters
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t40345
psql -h localhost -U postgres

Built from patchset v2 (message #2), July 28, 2026 at 04:27 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t40345_2 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t40345_2 && git checkout t40345_2

Patchset v2 (message #2) is on t40345_2

Jump to latest
#1Peter Eisentraut
peter_e@gmx.net
hackerscomitters

doc: Add some images

Add infrastructure for having images in the documentation, in SVG
format. Add two images to start with. See the included README file
for instructions.

Author: Jürgen Purtz <juergen@purtz.de>
Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: /messages/by-id/aaa54502-05c0-4ea5-9af8-770411a6bf4b@purtz.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ea55aec0a97d6cade0186df1913da2c8cb5c6f2c

Modified Files
--------------
.gitattributes | 1 +
doc/src/sgml/Makefile | 14 +-
doc/src/sgml/gin.sgml | 12 +-
doc/src/sgml/images/Makefile | 18 ++
doc/src/sgml/images/README | 61 ++++++
doc/src/sgml/images/gin.dot | 93 +++++++++
doc/src/sgml/images/gin.svg | 320 +++++++++++++++++++++++++++++++
doc/src/sgml/images/pagelayout.svg | 40 ++++
doc/src/sgml/images/pagelayout.txt | 11 ++
doc/src/sgml/storage.sgml | 14 ++
doc/src/sgml/stylesheet-hh.xsl | 6 +
doc/src/sgml/stylesheet-html-common.xsl | 1 +
doc/src/sgml/stylesheet-html-nochunk.xsl | 11 ++
doc/src/sgml/stylesheet.xsl | 6 +
14 files changed, 602 insertions(+), 6 deletions(-)

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Peter Eisentraut (#1)
hackerscomitters
Re: pgsql: doc: Add some images

On 2019-Mar-27, Peter Eisentraut wrote:

doc: Add some images

Add infrastructure for having images in the documentation, in SVG
format. Add two images to start with. See the included README file
for instructions.

I think you need something like the attached.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

t40345_2
images.patchtext/x-diff; charset=us-asciiDownload+3-1
#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Peter Eisentraut (#1)
hackerscomitters
Re: pgsql: doc: Add some images

On 2019-Mar-27, Peter Eisentraut wrote:

doc: Add some images

Add infrastructure for having images in the documentation, in SVG
format. Add two images to start with. See the included README file
for instructions.

Author: J�rgen Purtz <juergen@purtz.de>
Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

Now when I test J�rgen's new proposed image genetic-algorithm I find
that this stuff doesn't work in VPATH builds, at least for PDF -- I
don't get a build failure, but instead I get just a section title that
doesn't precede any actual image. (There's a very small warning hidden
in the tons of other fop output). If I edit the .fo file by hand to
make the path to .svg absolute, the image appears correctly.

I don't see any way in the fop docs to specify the base path for images.

I'm not sure what's a good way to fix this problem in a general way.
Would some new rule in the xslt would work?

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Jürgen Purtz
juergen@purtz.de
In reply to: Alvaro Herrera (#3)
hackerscomitters
Re: pgsql: doc: Add some images

On 16.08.19 23:00, Alvaro Herrera wrote:

On 2019-Mar-27, Peter Eisentraut wrote:

doc: Add some images

Add infrastructure for having images in the documentation, in SVG
format. Add two images to start with. See the included README file
for instructions.
Author: Jürgen Purtz <juergen@purtz.de>
Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

Now when I test Jürgen's new proposed image genetic-algorithm I find
that this stuff doesn't work in VPATH builds, at least for PDF -- I
don't get a build failure, but instead I get just a section title that
doesn't precede any actual image. (There's a very small warning hidden
in the tons of other fop output). If I edit the .fo file by hand to
make the path to .svg absolute, the image appears correctly.

I don't see any way in the fop docs to specify the base path for images.

I'm not sure what's a good way to fix this problem in a general way.
Would some new rule in the xslt would work?

Hello Alvaro,

it is be possible that you face the following situation: the image
subdirectory contains all ditaa and graphviz source files, but not all
corresponding svg files. Those svg files are created by the given
Makefile of this subdirectory resp. should be included in git (and
patches - what was not the case in one of my patches).

Can you acknowledge, that this is your starting situation when you miss
the graphic in PDF? If no, please give us more information: operation
system, ... . If yes, we have the following options:

a) Make sure that all svg files exists in addition to the original
source files (as it was originally planned)

b) Run make in images subdirectory manually

c) Append a line "    $(MAKE) -C images" to Makefile of sgml directory
for PDF, HTML and EPUB targets to check the dependencies within the
images subdirectory.

Kind regards, Jürgen

#5Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Jürgen Purtz (#4)
hackerscomitters
Re: pgsql: doc: Add some images

Hi J�rgen,

On 2019-Aug-18, J�rgen Purtz wrote:

it is be possible that you face the following situation: the image
subdirectory contains all ditaa and graphviz source files, but not all
corresponding svg files. Those svg files are created by the given Makefile
of this subdirectory resp. should be included in git (and patches - what was
not the case in one of my patches).

Not really ... I did create the .svg file by invoking the make rule for
it manually.

The files do exist, but they are in the wrong directory: they're in
/pgsql/source/master/doc/src/sgml/images
and the "make postgres-A4.pdf" was invoked in
/pgsql/build/master/doc/src/sgml/images
^^^^^

As I said, if I edit the .fo file to change the "images/foobar.svg"
entry to read "/pgsql/source/master/doc/src/sgml/images/foobar.svg" then
the built docco correctly includes the image.

A "VPATH" build is one where I invoke "configure" from a different
directory.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#6Peter Eisentraut
peter_e@gmx.net
In reply to: Alvaro Herrera (#3)
hackerscomitters
Re: pgsql: doc: Add some images

On 2019-08-16 22:00, Alvaro Herrera wrote:

Now when I test Jürgen's new proposed image genetic-algorithm I find
that this stuff doesn't work in VPATH builds, at least for PDF -- I
don't get a build failure, but instead I get just a section title that
doesn't precede any actual image. (There's a very small warning hidden
in the tons of other fop output). If I edit the .fo file by hand to
make the path to .svg absolute, the image appears correctly.

fixed

(I'm puzzled that one can't tell FOP to abort on an error like this.
The ASF JIRA is down right now, so I can't research this, but I'm
tempted to file a bug about this.)

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services