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 source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -38,82 +38,103 @@ ...@@ -38,82 +38,103 @@
<table id="pgbuffercache-columns"> <table id="pgbuffercache-columns">
<title><structname>pg_buffercache</structname> Columns</title> <title><structname>pg_buffercache</structname> Columns</title>
<tgroup cols="1">
<tgroup cols="4">
<thead> <thead>
<row> <row>
<entry>Name</entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry>Type</entry> Column Type
<entry>References</entry> </para>
<entry>Description</entry> <para>
Description
</para></entry>
</row> </row>
</thead> </thead>
<tbody>
<tbody>
<row> <row>
<entry><structfield>bufferid</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>integer</type></entry> <structfield>bufferid</structfield> <type>integer</type>
<entry></entry> </para>
<entry>ID, in the range 1..<varname>shared_buffers</varname></entry> <para>
ID, in the range 1..<varname>shared_buffers</varname>
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>relfilenode</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>oid</type></entry> <structfield>relfilenode</structfield> <type>oid</type>
<entry><literal>pg_class.relfilenode</literal></entry> (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relfilenode</structfield>)
<entry>Filenode number of the relation</entry> </para>
<para>
Filenode number of the relation
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>reltablespace</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>oid</type></entry> <structfield>reltablespace</structfield> <type>oid</type>
<entry><literal>pg_tablespace.oid</literal></entry> (references <link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.<structfield>oid</structfield>)
<entry>Tablespace OID of the relation</entry> </para>
<para>
Tablespace OID of the relation
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>reldatabase</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>oid</type></entry> <structfield>reldatabase</structfield> <type>oid</type>
<entry><literal>pg_database.oid</literal></entry> (references <link linkend="catalog-pg-database"><structname>pg_database</structname></link>.<structfield>oid</structfield>)
<entry>Database OID of the relation</entry> </para>
<para>
Database OID of the relation
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>relforknumber</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>smallint</type></entry> <structfield>relforknumber</structfield> <type>smallint</type>
<entry></entry> </para>
<entry>Fork number within the relation; see <para>
<filename>include/common/relpath.h</filename></entry> Fork number within the relation; see
<filename>include/common/relpath.h</filename>
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>relblocknumber</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>relblocknumber</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Page number within the relation</entry> <para>
Page number within the relation
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>isdirty</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>boolean</type></entry> <structfield>isdirty</structfield> <type>boolean</type>
<entry></entry> </para>
<entry>Is the page dirty?</entry> <para>
Is the page dirty?
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>usagecount</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>smallint</type></entry> <structfield>usagecount</structfield> <type>smallint</type>
<entry></entry> </para>
<entry>Clock-sweep access count</entry> <para>
Clock-sweep access count
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>pinning_backends</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>integer</type></entry> <structfield>pinning_backends</structfield> <type>integer</type>
<entry></entry> </para>
<entry>Number of backends pinning this buffer</entry> <para>
Number of backends pinning this buffer
</para></entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
......
...@@ -44,253 +44,310 @@ ...@@ -44,253 +44,310 @@
<table id="pgstatstatements-columns"> <table id="pgstatstatements-columns">
<title><structname>pg_stat_statements</structname> Columns</title> <title><structname>pg_stat_statements</structname> Columns</title>
<tgroup cols="1">
<tgroup cols="4">
<thead> <thead>
<row> <row>
<entry>Name</entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry>Type</entry> Column Type
<entry>References</entry> </para>
<entry>Description</entry> <para>
Description
</para></entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry><structfield>userid</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>oid</type></entry> <structfield>userid</structfield> <type>oid</type>
<entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry> (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
<entry>OID of user who executed the statement</entry> </para>
<para>
OID of user who executed the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>dbid</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>oid</type></entry> <structfield>dbid</structfield> <type>oid</type>
<entry><literal><link linkend="catalog-pg-database"><structname>pg_database</structname></link>.oid</literal></entry> (references <link linkend="catalog-pg-database"><structname>pg_database</structname></link>.<structfield>oid</structfield>)
<entry>OID of database in which the statement was executed</entry> </para>
<para>
OID of database in which the statement was executed
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>queryid</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>queryid</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Internal hash code, computed from the statement's parse tree</entry> <para>
Internal hash code, computed from the statement's parse tree
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>query</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>text</type></entry> <structfield>query</structfield> <type>text</type>
<entry></entry> </para>
<entry>Text of a representative statement</entry> <para>
Text of a representative statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>plans</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>plans</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Number of times the statement was planned</entry> <para>
Number of times the statement was planned
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>total_plan_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>total_plan_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Total time spent planning the statement, in milliseconds</entry> <para>
Total time spent planning the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>min_plan_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>min_plan_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Minimum time spent planning the statement, in milliseconds</entry> <para>
Minimum time spent planning the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>max_plan_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>max_plan_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Maximum time spent planning the statement, in milliseconds</entry> <para>
Maximum time spent planning the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>mean_plan_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>mean_plan_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Mean time spent planning the statement, in milliseconds</entry> <para>
Mean time spent planning the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>stddev_plan_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>stddev_plan_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Population standard deviation of time spent planning the statement, in milliseconds</entry> <para>
Population standard deviation of time spent planning the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>calls</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>calls</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Number of times the statement was executed</entry> <para>
Number of times the statement was executed
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>total_exec_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>total_exec_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Total time spent executing the statement, in milliseconds</entry> <para>
Total time spent executing the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>min_exec_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>min_exec_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Minimum time spent executing the statement, in milliseconds</entry> <para>
Minimum time spent executing the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>max_exec_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>max_exec_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Maximum time spent executing the statement, in milliseconds</entry> <para>
Maximum time spent executing the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>mean_exec_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>mean_exec_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Mean time spent executing the statement, in milliseconds</entry> <para>
Mean time spent executing the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>stddev_exec_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>stddev_exec_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry>Population standard deviation of time spent executing the statement, in milliseconds</entry> <para>
Population standard deviation of time spent executing the statement, in milliseconds
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>rows</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>rows</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of rows retrieved or affected by the statement</entry> <para>
Total number of rows retrieved or affected by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>shared_blks_hit</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>shared_blks_hit</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of shared block cache hits by the statement</entry> <para>
Total number of shared block cache hits by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>shared_blks_read</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>shared_blks_read</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of shared blocks read by the statement</entry> <para>
Total number of shared blocks read by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>shared_blks_dirtied</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>shared_blks_dirtied</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of shared blocks dirtied by the statement</entry> <para>
Total number of shared blocks dirtied by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>shared_blks_written</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>shared_blks_written</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of shared blocks written by the statement</entry> <para>
Total number of shared blocks written by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>local_blks_hit</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>local_blks_hit</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of local block cache hits by the statement</entry> <para>
Total number of local block cache hits by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>local_blks_read</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>local_blks_read</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of local blocks read by the statement</entry> <para>
Total number of local blocks read by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>local_blks_dirtied</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>local_blks_dirtied</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of local blocks dirtied by the statement</entry> <para>
Total number of local blocks dirtied by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>local_blks_written</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>local_blks_written</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of local blocks written by the statement</entry> <para>
Total number of local blocks written by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>temp_blks_read</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>temp_blks_read</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of temp blocks read by the statement</entry> <para>
Total number of temp blocks read by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>temp_blks_written</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>temp_blks_written</structfield> <type>bigint</type>
<entry></entry> </para>
<entry>Total number of temp blocks written by the statement</entry> <para>
Total number of temp blocks written by the statement
</para></entry>
</row> </row>
<row> <row>
<entry><structfield>blk_read_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>blk_read_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry> <para>
Total time the statement spent reading blocks, in milliseconds Total time the statement spent reading blocks, in milliseconds
(if <xref linkend="guc-track-io-timing"/> is enabled, otherwise zero) (if <xref linkend="guc-track-io-timing"/> is enabled, otherwise zero)
</entry> </para></entry>
</row> </row>
<row> <row>
<entry><structfield>blk_write_time</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>double precision</type></entry> <structfield>blk_write_time</structfield> <type>double precision</type>
<entry></entry> </para>
<entry> <para>
Total time the statement spent writing blocks, in milliseconds Total time the statement spent writing blocks, in milliseconds
(if <xref linkend="guc-track-io-timing"/> is enabled, otherwise zero) (if <xref linkend="guc-track-io-timing"/> is enabled, otherwise zero)
</entry> </para></entry>
</row> </row>
<row> <row>
<entry><structfield>wal_bytes</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>numeric</type></entry> <structfield>wal_records</structfield> <type>bigint</type>
<entry></entry> </para>
<entry> <para>
Total amount of WAL bytes generated by the statement Total number of WAL records generated by the statement
</entry> </para></entry>
</row> </row>
<row> <row>
<entry><structfield>wal_records</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>wal_fpi</structfield> <type>bigint</type>
<entry></entry> </para>
<entry> <para>
Total number of WAL records generated by the statement Total number of WAL full page images generated by the statement
</entry> </para></entry>
</row> </row>
<row> <row>
<entry><structfield>wal_fpi</structfield></entry> <entry role="catalog_table_entry"><para role="column_definition">
<entry><type>bigint</type></entry> <structfield>wal_bytes</structfield> <type>numeric</type>
<entry></entry> </para>
<entry> <para>
Total number of WAL full page images generated by the statement Total amount of WAL bytes generated by the statement
</entry> </para></entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
......
...@@ -79,6 +79,16 @@ ...@@ -79,6 +79,16 @@
</fo:block> </fo:block>
</xsl:template> </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 --> <!-- overrides stylesheet-common.xsl -->
<!-- FOP needs us to be explicit about the font to use for right arrow --> <!-- FOP needs us to be explicit about the font to use for right arrow -->
<xsl:template match="returnvalue"> <xsl:template match="returnvalue">
......
...@@ -96,6 +96,36 @@ td.func_table_entry pre.programlisting { ...@@ -96,6 +96,36 @@ td.func_table_entry pre.programlisting {
padding-left: 4em; 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 /* 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 admon.style in XSL) so that the web site stylesheet can set its own
style. */ style. */
...@@ -115,6 +145,10 @@ pre.literallayout, .screen, .synopsis, .programlisting { ...@@ -115,6 +145,10 @@ pre.literallayout, .screen, .synopsis, .programlisting {
margin-left: 4ex; margin-left: 4ex;
} }
ul.itemizedlist {
margin-left: 2.5rem;
}
.comment { color: red; } .comment { color: red; }
var { font-family: monospace; font-style: italic; } 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