> On 22/06/2023 23:00 CEST Bruce Momjian <[email protected]> wrote:
>
> On Thu, Jun 22, 2023 at 01:47:16PM -0700, Kirk Parker wrote:
> >
> > I don't suppose DocBook has macro and system-variable capabilities? That
> > could provide a set-and-forget solution to this?
>
> Uh, I am not aware of any.
An SGML entity [0] or an xsltproc stringparam [1] looks viable. Question is
how to calculate the number of decades in the Makefile. It's trivial in SQL :)
=# select extract(decade from now()) - extract(decade from date
'1986-01-01');
?column?
----------
4
(1 row)
=# select extract(day from now() - date '1986-01-01') / 365.25 / 10;
?column?
--------------------
3.7472963723477071
(1 row)
[0]
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=doc/src/sgml/Makefile;h=71cbef230f34a6ad6b41a667c7d2977fb6560378;hb=HEAD#l98
[1]
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=doc/src/sgml/Makefile;h=71cbef230f34a6ad6b41a667c7d2977fb6560378;hb=HEAD#l56
--
Erik