Commit a0427506 authored by Tom Lane's avatar Tom Lane

Doc: reformat catalog/view description tables.

This changes our catalog and view descriptions to use a style inspired
by the new format for function/operator tables: each table entry is
formatted roughly like a <varlistentry>, with the column name and type
on the first line and then an indented description.  This provides much
more room for expansive descriptions than we had before, and thereby
eliminates a passel of PDF build warnings.

Discussion: https://postgr.es/m/12984.1588643549@sss.pgh.pa.us
parent 7fd89f4d
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -38,82 +38,103 @@
<table id="pgbuffercache-columns">
<title><structname>pg_buffercache</structname> Columns</title>
<tgroup cols="4">
<tgroup cols="1">
<thead>
<row>
<entry>Name</entry>
<entry>Type</entry>
<entry>References</entry>
<entry>Description</entry>
<entry role="catalog_table_entry"><para role="column_definition">
Column Type
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<tbody>
<row>
<entry><structfield>bufferid</structfield></entry>
<entry><type>integer</type></entry>
<entry></entry>
<entry>ID, in the range 1..<varname>shared_buffers</varname></entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>bufferid</structfield> <type>integer</type>
</para>
<para>
ID, in the range 1..<varname>shared_buffers</varname>
</para></entry>
</row>
<row>
<entry><structfield>relfilenode</structfield></entry>
<entry><type>oid</type></entry>
<entry><literal>pg_class.relfilenode</literal></entry>
<entry>Filenode number of the relation</entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>relfilenode</structfield> <type>oid</type>
(references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relfilenode</structfield>)
</para>
<para>
Filenode number of the relation
</para></entry>
</row>
<row>
<entry><structfield>reltablespace</structfield></entry>
<entry><type>oid</type></entry>
<entry><literal>pg_tablespace.oid</literal></entry>
<entry>Tablespace OID of the relation</entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>reltablespace</structfield> <type>oid</type>
(references <link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.<structfield>oid</structfield>)
</para>
<para>
Tablespace OID of the relation
</para></entry>
</row>
<row>
<entry><structfield>reldatabase</structfield></entry>
<entry><type>oid</type></entry>
<entry><literal>pg_database.oid</literal></entry>
<entry>Database OID of the relation</entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>reldatabase</structfield> <type>oid</type>
(references <link linkend="catalog-pg-database"><structname>pg_database</structname></link>.<structfield>oid</structfield>)
</para>
<para>
Database OID of the relation
</para></entry>
</row>
<row>
<entry><structfield>relforknumber</structfield></entry>
<entry><type>smallint</type></entry>
<entry></entry>
<entry>Fork number within the relation; see
<filename>include/common/relpath.h</filename></entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>relforknumber</structfield> <type>smallint</type>
</para>
<para>
Fork number within the relation; see
<filename>include/common/relpath.h</filename>
</para></entry>
</row>
<row>
<entry><structfield>relblocknumber</structfield></entry>
<entry><type>bigint</type></entry>
<entry></entry>
<entry>Page number within the relation</entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>relblocknumber</structfield> <type>bigint</type>
</para>
<para>
Page number within the relation
</para></entry>
</row>
<row>
<entry><structfield>isdirty</structfield></entry>
<entry><type>boolean</type></entry>
<entry></entry>
<entry>Is the page dirty?</entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>isdirty</structfield> <type>boolean</type>
</para>
<para>
Is the page dirty?
</para></entry>
</row>
<row>
<entry><structfield>usagecount</structfield></entry>
<entry><type>smallint</type></entry>
<entry></entry>
<entry>Clock-sweep access count</entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>usagecount</structfield> <type>smallint</type>
</para>
<para>
Clock-sweep access count
</para></entry>
</row>
<row>
<entry><structfield>pinning_backends</structfield></entry>
<entry><type>integer</type></entry>
<entry></entry>
<entry>Number of backends pinning this buffer</entry>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>pinning_backends</structfield> <type>integer</type>
</para>
<para>
Number of backends pinning this buffer
</para></entry>
</row>
</tbody>
</tgroup>
</table>
......
This diff is collapsed.
......@@ -79,6 +79,16 @@
</fo:block>
</xsl:template>
<!-- formatting for entries in tables of catalog/view columns -->
<xsl:template match="entry[@role='catalog_table_entry']/para">
<fo:block margin-left="4em" text-align="left">
<xsl:if test="self::para[@role='column_definition']">
<xsl:attribute name="text-indent">-3.5em</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<!-- overrides stylesheet-common.xsl -->
<!-- FOP needs us to be explicit about the font to use for right arrow -->
<xsl:template match="returnvalue">
......
......@@ -96,6 +96,36 @@ td.func_table_entry pre.programlisting {
padding-left: 4em;
}
/* formatting for entries in tables of catalog/view columns */
th.catalog_table_entry p,
td.catalog_table_entry p {
margin-top: 0.1em;
margin-bottom: 0.1em;
padding-left: 4em;
text-align: left;
}
th.catalog_table_entry p.column_definition {
text-indent: -3.5em;
word-spacing: 0.25em;
}
td.catalog_table_entry p.column_definition {
text-indent: -3.5em;
}
p.column_definition code.type {
padding-left: 0.25em;
padding-right: 0.25em;
}
td.catalog_table_entry pre.programlisting {
margin-top: 0.1em;
margin-bottom: 0.1em;
padding-left: 4em;
}
/* Put these here instead of inside the HTML (see unsetting of
admon.style in XSL) so that the web site stylesheet can set its own
style. */
......@@ -115,6 +145,10 @@ pre.literallayout, .screen, .synopsis, .programlisting {
margin-left: 4ex;
}
ul.itemizedlist {
margin-left: 2.5rem;
}
.comment { color: red; }
var { font-family: monospace; font-style: italic; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment