Getting our tables to render better in PDF output

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Getting our tables to render better in PDF output
Дата
Msg-id 9326.1581457869@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Getting our tables to render better in PDF output  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-docs
The crummy formatting of our tables of functions and operators has
been an issue for a long time.  To my mind, there are several things
that need to be addressed:

* The layout is completely unfriendly to function descriptions that
run to more than a few words.

* It's not very practical to have more than one example per function
(or at least, we seldom do so).

* The results look completely awful in PDF format, because of the
narrow effectively-available space, plus the fact that the toolchain
will prefer to overprint following columns instead of breaking text
where there's no whitespace.

In [1], Alvaro suggested that we might be able to improve matters by
taking advantage of DocBook's features for column and row spanning.
I did some concrete experimentation in that line, and attached are
two alternative patches that show a couple of things we might do.
Both patches change tables 9.31 (Date/Time Functions) and 9.33
(Enum Support Functions), which I chose somewhat at random, but of
course there would be a lot more to be done if we choose to go this way.

The first patch uses only one row for each function example, while
the second patch uses two rows (i.e., example and result in separate
table rows).  Otherwise they're the same.

I initially did the enum-support table, and what I tried there included
getting rid of the separate table column for function result type by
writing the functions in the form "func(argtypes) returns resulttype".
(Note that this table failed to specify the result types at all before,
which doesn't seem great.)  The layout idea is

    function name, args, result               description
                                         example     example result

where we can repeat the "example / example result" row if we want more
examples per function.  Alternatively, in the second patch, it's

    function name, args, result          description
                                         example
                                         example result

To my eyes, the first alternative is preferable in HTML, unless maybe you
want to read the manual in a *very* narrow browser window.  But some of
the examples/results still overrun the available space when looking
at it in PDF A4 format.  The second patch fixes that problem, but seems
not very pretty in a normal-width browser window.

When I tried to apply the same idea to the date/time functions table,
it didn't really work well at all, mainly because of a few beasts like
make_interval() --- that caused the left column to be so wide that the
right-hand columns were horrid.  (At least with the toolchain version
I'm using, it seems like the colwidth specifications are respected
rigidly in PDF output but just plain ignored in HTML output.  What
seems to happen in HTML is that earlier columns get their preferred
width and later ones get squeezed.)

So the layout idea that the patches show for that table is

    function name      arg types     result type
                       description
                       example     example result

or

    function name      arg types     result type
                       description
                       example
                       example result

(Even with that, I had to savage make_interval's arg-types list a bit
to keep that column from eating too much space...)

I'm not especially wedded to any of these ideas, but I hope to provoke
some discussion about what we might do in this area.  DocBook tables
aren't the greatest layout tool in the world, but they do have abilities
we're not exploiting.

Even with these changes, the amount of space available for examples
and results in PDF format is pretty tiny.  With examples and results
in the same row, it seems that you can only have a couple of dozen
consecutive non-whitespace characters without running into overwrite
issues, whereas in HTML format the trouble threshold is a good deal
higher.  I wonder if we could improve matters by switching to some
narrower font for <literal> text in PDF?

            regards, tom lane

[1] https://www.postgresql.org/message-id/20200116184444.GA25792%40alvherre.pgsql

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index ceda48e..385fdc0 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -6798,471 +6798,618 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');

     <table id="functions-datetime-table">
      <title>Date/Time Functions</title>
-     <tgroup cols="5">
+     <tgroup cols="3">
+      <colspec colnum="1" colname="col1" colwidth="1*"/>
+      <colspec colnum="2" colname="col2" colwidth="1*"/>
+      <colspec colnum="3" colname="col3" colwidth="1*"/>
+      <spanspec spanname="func" namest="col1" nameend="col1" align="left"/>
+      <spanspec spanname="args" namest="col2" nameend="col2" align="left"/>
+      <spanspec spanname="result" namest="col3" nameend="col3" align="left"/>
+      <spanspec spanname="desc" namest="col2" nameend="col3" align="left"/>
+      <spanspec spanname="example" namest="col2" nameend="col2" align="left"/>
+      <spanspec spanname="exresult" namest="col3" nameend="col3" align="left"/>
       <thead>
        <row>
-        <entry>Function</entry>
-        <entry>Return Type</entry>
-        <entry>Description</entry>
-        <entry>Example</entry>
-        <entry>Result</entry>
+        <entry spanname="func" align="center" morerows="2">Function</entry>
+        <entry spanname="args" align="center">Argument Types</entry>
+        <entry spanname="result" align="center">Result Type</entry>
+       </row>
+       <row>
+        <entry spanname="desc" align="center">Description</entry>
+       </row>
+       <row>
+        <entry spanname="example" align="center">Example</entry>
+        <entry spanname="exresult" align="center">Example Result</entry>
        </row>
       </thead>

       <tbody>
        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>age</primary>
          </indexterm>
-         <literal><function>age(<type>timestamp</type>, <type>timestamp</type>)</function></literal>
+         <function>age</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>Subtract arguments, producing a <quote>symbolic</quote> result that
+        <entry spanname="args"><type>timestamp</type>, <type>timestamp</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Subtract arguments, producing a <quote>symbolic</quote> result that
         uses years and months, rather than just days</entry>
-        <entry><literal>age(timestamp '2001-04-10', timestamp '1957-06-13')</literal></entry>
-        <entry><literal>43 years 9 mons 27 days</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>age(timestamp '2001-04-10', timestamp '1957-06-13')</literal></entry>
+        <entry spanname="exresult"><literal>43 years 9 mons 27 days</literal></entry>
        </row>

        <row>
-        <entry><literal><function>age(<type>timestamp</type>)</function></literal></entry>
-        <entry><type>interval</type></entry>
-        <entry>Subtract from <function>current_date</function> (at midnight)</entry>
-        <entry><literal>age(timestamp '1957-06-13')</literal></entry>
-        <entry><literal>43 years 8 mons 3 days</literal></entry>
+        <entry spanname="func" morerows="2"><function>age</function></entry>
+        <entry spanname="args"><type>timestamp</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Subtract from <function>current_date</function> (at midnight)</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>age(timestamp '1957-06-13')</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>clock_timestamp</primary>
          </indexterm>
-         <literal><function>clock_timestamp()</function></literal>
+         <function>clock_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (changes during statement execution);
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (changes during statement execution);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>clock_timestamp()</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>current_date</primary>
          </indexterm>
-         <literal><function>current_date</function></literal>
+         <function>current_date</function>
         </entry>
-        <entry><type>date</type></entry>
-        <entry>Current date;
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>date</type></entry>
+       </row>
+       <row>
+         <entry spanname="desc">Current date;
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>current_date</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>current_time</primary>
          </indexterm>
-         <literal><function>current_time</function></literal>
+         <function>current_time</function>
         </entry>
-        <entry><type>time with time zone</type></entry>
-        <entry>Current time of day;
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>time with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current time of day;
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>current_time</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>current_timestamp</primary>
          </indexterm>
-         <literal><function>current_timestamp</function></literal>
+         <function>current_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (start of current transaction);
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current transaction);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>current_timestamp</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>date_part</primary>
          </indexterm>
-         <literal><function>date_part(<type>text</type>, <type>timestamp</type>)</function></literal>
+         <function>date_part</function>
         </entry>
-        <entry><type>double precision</type></entry>
-        <entry>Get subfield (equivalent to <function>extract</function>);
+        <entry spanname="args"><type>text</type>, <type>timestamp</type></entry>
+        <entry spanname="result"><type>double precision</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Get subfield (equivalent to <function>extract</function>);
          see <xref linkend="functions-datetime-extract"/>
         </entry>
-        <entry><literal>date_part('hour', timestamp '2001-02-16 20:38:40')</literal></entry>
-        <entry><literal>20</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_part('hour', timestamp '2001-02-16 20:38:40')</literal></entry>
+        <entry spanname="exresult"><literal>20</literal></entry>
        </row>

        <row>
-        <entry><literal><function>date_part(<type>text</type>, <type>interval</type>)</function></literal></entry>
-        <entry><type>double precision</type></entry>
-        <entry>Get subfield (equivalent to
+        <entry spanname="func" morerows="2"><function>date_part</function></entry>
+        <entry spanname="args"><type>text</type>, <type>interval</type></entry>
+        <entry spanname="result"><type>double precision</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Get subfield (equivalent to
          <function>extract</function>); see <xref linkend="functions-datetime-extract"/>
         </entry>
-        <entry><literal>date_part('month', interval '2 years 3 months')</literal></entry>
-        <entry><literal>3</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_part('month', interval '2 years 3 months')</literal></entry>
+        <entry spanname="exresult"><literal>3</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>date_trunc</primary>
          </indexterm>
-         <literal><function>date_trunc(<type>text</type>, <type>timestamp</type>)</function></literal>
+         <function>date_trunc</function>
         </entry>
-        <entry><type>timestamp</type></entry>
-        <entry>Truncate to specified precision; see <xref linkend="functions-datetime-trunc"/>
+        <entry spanname="args"><type>text</type>, <type>timestamp</type></entry>
+        <entry spanname="result"><type>timestamp</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Truncate to specified precision; see <xref linkend="functions-datetime-trunc"/>
         </entry>
-        <entry><literal>date_trunc('hour', timestamp '2001-02-16 20:38:40')</literal></entry>
-        <entry><literal>2001-02-16 20:00:00</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_trunc('hour', timestamp '2001-02-16 20:38:40')</literal></entry>
+        <entry spanname="exresult"><literal>2001-02-16 20:00:00</literal></entry>
        </row>

        <row>
-        <entry><literal><function>date_trunc(<type>text</type>, <type>timestamp with time zone</type>,
<type>text</type>)</function></literal></entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Truncate to specified precision in the specified time zone; see <xref
linkend="functions-datetime-trunc"/>
+        <entry spanname="func" morerows="2"><function>date_trunc</function></entry>
+        <entry spanname="args"><type>text</type>, <type>timestamp with time zone</type>, <type>text</type></entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Truncate to specified precision in the specified time zone; see <xref
linkend="functions-datetime-trunc"/>
         </entry>
-        <entry><literal>date_trunc('day', timestamptz '2001-02-16 20:38:40+00', 'Australia/Sydney')</literal></entry>
-        <entry><literal>2001-02-16 13:00:00+00</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_trunc('day', timestamptz '2001-02-16 20:38:40+00',
'Australia/Sydney')</literal></entry>
+        <entry spanname="exresult"><literal>2001-02-16 13:00:00+00</literal></entry>
        </row>

        <row>
-        <entry><literal><function>date_trunc(<type>text</type>, <type>interval</type>)</function></literal></entry>
-        <entry><type>interval</type></entry>
-        <entry>Truncate to specified precision; see <xref linkend="functions-datetime-trunc"/>
+        <entry spanname="func" morerows="2"><function>date_trunc</function></entry>
+        <entry spanname="args"><type>text</type>, <type>interval</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Truncate to specified precision; see <xref linkend="functions-datetime-trunc"/>
         </entry>
-        <entry><literal>date_trunc('hour', interval '2 days 3 hours 40 minutes')</literal></entry>
-        <entry><literal>2 days 03:00:00</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_trunc('hour', interval '2 days 3 hours 40 minutes')</literal></entry>
+        <entry spanname="exresult"><literal>2 days 03:00:00</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>extract</primary>
          </indexterm>
-         <literal><function>extract</function>(<parameter>field</parameter> from
-         <type>timestamp</type>)</literal>
+         <function>extract</function>
         </entry>
-        <entry><type>double precision</type></entry>
-        <entry>Get subfield; see <xref linkend="functions-datetime-extract"/>
+        <entry spanname="args"><parameter>field</parameter> <literal>from</literal> <type>timestamp</type></entry>
+        <entry spanname="result"><type>double precision</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Get subfield; see <xref linkend="functions-datetime-extract"/>
         </entry>
-        <entry><literal>extract(hour from timestamp '2001-02-16 20:38:40')</literal></entry>
-        <entry><literal>20</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>extract(hour from timestamp '2001-02-16 20:38:40')</literal></entry>
+        <entry spanname="exresult"><literal>20</literal></entry>
        </row>

        <row>
-        <entry><literal><function>extract</function>(<parameter>field</parameter> from
-         <type>interval</type>)</literal></entry>
-        <entry><type>double precision</type></entry>
-        <entry>Get subfield; see <xref linkend="functions-datetime-extract"/>
+        <entry spanname="func" morerows="2"><function>extract</function></entry>
+        <entry spanname="args"><parameter>field</parameter> <literal>from</literal> <type>interval</type></entry>
+        <entry spanname="result"><type>double precision</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Get subfield; see <xref linkend="functions-datetime-extract"/>
         </entry>
-        <entry><literal>extract(month from interval '2 years 3 months')</literal></entry>
-        <entry><literal>3</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>extract(month from interval '2 years 3 months')</literal></entry>
+        <entry spanname="exresult"><literal>3</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>isfinite</primary>
          </indexterm>
-         <literal><function>isfinite(<type>date</type>)</function></literal>
+         <function>isfinite</function>
         </entry>
-        <entry><type>boolean</type></entry>
-        <entry>Test for finite date (not +/-infinity)</entry>
-        <entry><literal>isfinite(date '2001-02-16')</literal></entry>
-        <entry><literal>true</literal></entry>
+        <entry spanname="args"><type>date</type></entry>
+        <entry spanname="result"><type>boolean</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Test for finite date (not +/-infinity)</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>isfinite(date '2001-02-16')</literal></entry>
+        <entry spanname="exresult"><literal>true</literal></entry>
        </row>

        <row>
-        <entry><literal><function>isfinite(<type>timestamp</type>)</function></literal></entry>
-        <entry><type>boolean</type></entry>
-        <entry>Test for finite time stamp (not +/-infinity)</entry>
-        <entry><literal>isfinite(timestamp '2001-02-16 21:28:30')</literal></entry>
-        <entry><literal>true</literal></entry>
+        <entry spanname="func" morerows="2"><function>isfinite</function></entry>
+        <entry spanname="args"><type>timestamp</type></entry>
+        <entry spanname="result"><type>boolean</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Test for finite time stamp (not +/-infinity)</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>isfinite(timestamp '2001-02-16 21:28:30')</literal></entry>
+        <entry spanname="exresult"><literal>true</literal></entry>
        </row>

        <row>
-        <entry><literal><function>isfinite(<type>interval</type>)</function></literal></entry>
-        <entry><type>boolean</type></entry>
-        <entry>Test for finite interval</entry>
-        <entry><literal>isfinite(interval '4 hours')</literal></entry>
-        <entry><literal>true</literal></entry>
+        <entry spanname="func" morerows="2"><function>isfinite</function></entry>
+        <entry spanname="args"><type>interval</type></entry>
+        <entry spanname="result"><type>boolean</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Test for finite interval</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>isfinite(interval '4 hours')</literal></entry>
+        <entry spanname="exresult"><literal>true</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>justify_days</primary>
          </indexterm>
-         <literal><function>justify_days(<type>interval</type>)</function></literal>
+         <function>justify_days</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>Adjust interval so 30-day time periods are represented as months</entry>
-        <entry><literal>justify_days(interval '35 days')</literal></entry>
-        <entry><literal>1 mon 5 days</literal></entry>
+        <entry spanname="args"><type>interval</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Adjust interval so 30-day time periods are represented as months</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>justify_days(interval '35 days')</literal></entry>
+        <entry spanname="exresult"><literal>1 mon 5 days</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>justify_hours</primary>
          </indexterm>
-         <literal><function>justify_hours(<type>interval</type>)</function></literal>
+         <function>justify_hours</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>Adjust interval so 24-hour time periods are represented as days</entry>
-        <entry><literal>justify_hours(interval '27 hours')</literal></entry>
-        <entry><literal>1 day 03:00:00</literal></entry>
+        <entry spanname="args"><type>interval</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Adjust interval so 24-hour time periods are represented as days</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>justify_hours(interval '27 hours')</literal></entry>
+        <entry spanname="exresult"><literal>1 day 03:00:00</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>justify_interval</primary>
          </indexterm>
-         <literal><function>justify_interval(<type>interval</type>)</function></literal>
+         <function>justify_interval</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>Adjust interval using <function>justify_days</function> and <function>justify_hours</function>, with
additionalsign adjustments</entry> 
-        <entry><literal>justify_interval(interval '1 mon -1 hour')</literal></entry>
-        <entry><literal>29 days 23:00:00</literal></entry>
+        <entry spanname="args"><type>interval</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Adjust interval using <function>justify_days</function> and
<function>justify_hours</function>,with additional sign adjustments</entry> 
+       </row>
+       <row>
+        <entry spanname="example"><literal>justify_interval(interval '1 mon -1 hour')</literal></entry>
+        <entry spanname="exresult"><literal>29 days 23:00:00</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>localtime</primary>
          </indexterm>
-         <literal><function>localtime</function></literal>
+         <function>localtime</function>
         </entry>
-        <entry><type>time</type></entry>
-        <entry>Current time of day;
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>time</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current time of day;
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>localtime</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>localtimestamp</primary>
          </indexterm>
-         <literal><function>localtimestamp</function></literal>
+         <function>localtimestamp</function>
         </entry>
-        <entry><type>timestamp</type></entry>
-        <entry>Current date and time (start of current transaction);
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>timestamp</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current transaction);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>localtimestamp</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>make_date</primary>
          </indexterm>
-         <literal>
-            <function>
-             make_date(<parameter>year</parameter> <type>int</type>,
-             <parameter>month</parameter> <type>int</type>,
-             <parameter>day</parameter> <type>int</type>)
-            </function>
-         </literal>
+         <function>make_date</function>
         </entry>
-        <entry><type>date</type></entry>
-        <entry>
+        <entry spanname="args"><parameter>year</parameter> <type>int</type>,
+         <parameter>month</parameter> <type>int</type>,
+         <parameter>day</parameter> <type>int</type></entry>
+        <entry spanname="result"><type>date</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create date from year, month and day fields
         </entry>
-        <entry><literal>make_date(2013, 7, 15)</literal></entry>
-        <entry><literal>2013-07-15</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_date(2013, 7, 15)</literal></entry>
+        <entry spanname="exresult"><literal>2013-07-15</literal></entry>
        </row>

        <row>
-        <entry>
-         <indexterm>
+        <entry spanname="func" morerows="2"><indexterm>
           <primary>make_interval</primary>
          </indexterm>
-         <literal>
-          <function>
-           make_interval(<parameter>years</parameter> <type>int</type> DEFAULT 0,
-           <parameter>months</parameter> <type>int</type> DEFAULT 0,
-           <parameter>weeks</parameter> <type>int</type> DEFAULT 0,
-           <parameter>days</parameter> <type>int</type> DEFAULT 0,
-           <parameter>hours</parameter> <type>int</type> DEFAULT 0,
-           <parameter>mins</parameter> <type>int</type> DEFAULT 0,
-           <parameter>secs</parameter> <type>double precision</type> DEFAULT 0.0)
-          </function>
-         </literal>
+         <function>make_interval</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>
+        <entry spanname="args"><optional> <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>double precision</type>
+         </optional></optional></optional></optional></optional></optional></optional></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create interval from years, months, weeks, days, hours, minutes and
-         seconds fields
+         seconds fields, each of which can default to zero
         </entry>
-        <entry><literal>make_interval(days => 10)</literal></entry>
-        <entry><literal>10 days</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_interval(days => 10)</literal></entry>
+        <entry spanname="exresult"><literal>10 days</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>make_time</primary>
          </indexterm>
-         <literal>
-          <function>
-           make_time(<parameter>hour</parameter> <type>int</type>,
-           <parameter>min</parameter> <type>int</type>,
-           <parameter>sec</parameter> <type>double precision</type>)
-          </function>
-         </literal>
+         <function>make_time</function>
         </entry>
-        <entry><type>time</type></entry>
-        <entry>
+        <entry spanname="args"><parameter>hour</parameter> <type>int</type>,
+         <parameter>min</parameter> <type>int</type>,
+         <parameter>sec</parameter> <type>double precision</type></entry>
+        <entry spanname="result"><type>time</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create time from hour, minute and seconds fields
         </entry>
-        <entry><literal>make_time(8, 15, 23.5)</literal></entry>
-        <entry><literal>08:15:23.5</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_time(8, 15, 23.5)</literal></entry>
+        <entry spanname="exresult"><literal>08:15:23.5</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>make_timestamp</primary>
          </indexterm>
-         <literal>
-          <function>
-           make_timestamp(<parameter>year</parameter> <type>int</type>,
-           <parameter>month</parameter> <type>int</type>,
-           <parameter>day</parameter> <type>int</type>,
-           <parameter>hour</parameter> <type>int</type>,
-           <parameter>min</parameter> <type>int</type>,
-           <parameter>sec</parameter> <type>double precision</type>)
-          </function>
-         </literal>
+         <function>make_timestamp</function>
         </entry>
-        <entry><type>timestamp</type></entry>
-        <entry>
+        <entry spanname="args"><parameter>year</parameter> <type>int</type>,
+         <parameter>month</parameter> <type>int</type>,
+         <parameter>day</parameter> <type>int</type>,
+         <parameter>hour</parameter> <type>int</type>,
+         <parameter>min</parameter> <type>int</type>,
+         <parameter>sec</parameter> <type>double precision</type></entry>
+        <entry spanname="result"><type>timestamp</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create timestamp from year, month, day, hour, minute and seconds fields
         </entry>
-        <entry><literal>make_timestamp(2013, 7, 15, 8, 15, 23.5)</literal></entry>
-        <entry><literal>2013-07-15 08:15:23.5</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_timestamp(2013, 7, 15, 8, 15, 23.5)</literal></entry>
+        <entry spanname="exresult"><literal>2013-07-15 08:15:23.5</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>make_timestamptz</primary>
          </indexterm>
-         <literal>
-          <function>
-           make_timestamptz(<parameter>year</parameter> <type>int</type>,
-           <parameter>month</parameter> <type>int</type>,
-           <parameter>day</parameter> <type>int</type>,
-           <parameter>hour</parameter> <type>int</type>,
-           <parameter>min</parameter> <type>int</type>,
-           <parameter>sec</parameter> <type>double precision</type>,
-           <optional> <parameter>timezone</parameter> <type>text</type> </optional>)
-          </function>
-         </literal>
+         <function>make_timestamptz</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>
+        <entry spanname="args"><parameter>year</parameter> <type>int</type>,
+         <parameter>month</parameter> <type>int</type>,
+         <parameter>day</parameter> <type>int</type>,
+         <parameter>hour</parameter> <type>int</type>,
+         <parameter>min</parameter> <type>int</type>,
+         <parameter>sec</parameter> <type>double precision</type>,
+         <optional> <parameter>timezone</parameter> <type>text</type> </optional></entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create timestamp with time zone from year, month, day, hour, minute
          and seconds fields; if <parameter>timezone</parameter> is not
          specified, the current time zone is used
         </entry>
-        <entry><literal>make_timestamptz(2013, 7, 15, 8, 15, 23.5)</literal></entry>
-        <entry><literal>2013-07-15 08:15:23.5+01</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_timestamptz(2013, 7, 15, 8, 15, 23.5)</literal></entry>
+        <entry spanname="exresult"><literal>2013-07-15 08:15:23.5+01</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>now</primary>
          </indexterm>
-         <literal><function>now()</function></literal>
+         <function>now</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (start of current transaction);
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current transaction);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>now()</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>statement_timestamp</primary>
          </indexterm>
-         <literal><function>statement_timestamp()</function></literal>
+         <function>statement_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (start of current statement);
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current statement);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>statement_timestamp()</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>timeofday</primary>
          </indexterm>
-         <literal><function>timeofday()</function></literal>
+         <function>timeofday</function>
         </entry>
-        <entry><type>text</type></entry>
-        <entry>Current date and time
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>text</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time
          (like <function>clock_timestamp</function>, but as a <type>text</type> string);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>timeofday()</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>transaction_timestamp</primary>
          </indexterm>
-         <literal><function>transaction_timestamp()</function></literal>
+         <function>transaction_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (start of current transaction);
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current transaction);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
        </row>
        <row>
-        <entry>
+        <entry spanname="example"><literal>transaction_timestamp()</literal></entry>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
+       </row>
+       <row>
+        <entry spanname="func" morerows="2">
          <indexterm>
           <primary>to_timestamp</primary>
          </indexterm>
-         <literal><function>to_timestamp(<type>double precision</type>)</function></literal>
+         <function>to_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to
+        <entry spanname="args"><type>double precision</type></entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to
          timestamp</entry>
-        <entry><literal>to_timestamp(1284352323)</literal></entry>
-        <entry><literal>2010-09-13 04:32:03+00</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>to_timestamp(1284352323)</literal></entry>
+        <entry spanname="exresult"><literal>2010-09-13 04:32:03+00</literal></entry>
        </row>
       </tbody>
      </tgroup>
@@ -8236,52 +8383,67 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple

   <table id="functions-enum-table">
     <title>Enum Support Functions</title>
-    <tgroup cols="4">
+    <tgroup cols="3">
+     <colspec colnum="1" colname="col1" colwidth="1*"/>
+     <colspec colnum="2" colname="col2" colwidth="1*"/>
+     <colspec colnum="3" colname="col3" colwidth="1*"/>
+     <spanspec spanname="func" namest="col1" nameend="col1" align="left"/>
+     <spanspec spanname="desc" namest="col2" nameend="col3" align="left"/>
+     <spanspec spanname="example" namest="col2" nameend="col2" align="left"/>
+     <spanspec spanname="exresult" namest="col3" nameend="col3" align="left"/>
      <thead>
       <row>
-       <entry>Function</entry>
-       <entry>Description</entry>
-       <entry>Example</entry>
-       <entry>Example Result</entry>
+       <entry spanname="func" align="center" morerows="1">Function</entry>
+       <entry spanname="desc" align="center">Description</entry>
+      </row>
+      <row>
+       <entry spanname="example" align="center">Example</entry>
+       <entry spanname="exresult" align="center">Result</entry>
       </row>
      </thead>
      <tbody>
       <row>
-       <entry>
+       <entry spanname="func" morerows="1">
          <indexterm>
           <primary>enum_first</primary>
          </indexterm>
-         <literal>enum_first(anyenum)</literal>
+         <literal>enum_first(anyenum) returns anyenum</literal>
        </entry>
-       <entry>Returns the first value of the input enum type</entry>
-       <entry><literal>enum_first(null::rainbow)</literal></entry>
-       <entry><literal>red</literal></entry>
+       <entry spanname="desc">Returns the first value of the input enum type</entry>
       </row>
       <row>
-       <entry>
+       <entry spanname="example"><literal>enum_first(null::rainbow)</literal></entry>
+       <entry spanname="exresult"><literal>red</literal></entry>
+      </row>
+      <row>
+       <entry spanname="func" morerows="1">
          <indexterm>
           <primary>enum_last</primary>
          </indexterm>
-         <literal>enum_last(anyenum)</literal>
+         <literal>enum_last(anyenum) returns anyenum</literal>
        </entry>
-       <entry>Returns the last value of the input enum type</entry>
-       <entry><literal>enum_last(null::rainbow)</literal></entry>
-       <entry><literal>purple</literal></entry>
+       <entry spanname="desc">Returns the last value of the input enum type</entry>
       </row>
       <row>
-       <entry>
+       <entry spanname="example"><literal>enum_last(null::rainbow)</literal></entry>
+       <entry spanname="exresult"><literal>purple</literal></entry>
+      </row>
+      <row>
+       <entry spanname="func" morerows="1">
          <indexterm>
           <primary>enum_range</primary>
          </indexterm>
-         <literal>enum_range(anyenum)</literal>
+         <literal>enum_range(anyenum) returns anyarray</literal>
        </entry>
-       <entry>Returns all values of the input enum type in an ordered array</entry>
-       <entry><literal>enum_range(null::rainbow)</literal></entry>
-       <entry><literal>{red,orange,yellow,green,blue,purple}</literal></entry>
+       <entry spanname="desc">Returns all values of the input enum type in an ordered array</entry>
+      </row>
+      <row>
+       <entry spanname="example"><literal>enum_range(null::rainbow)</literal></entry>
+       <entry spanname="exresult"><literal>{red,orange,yellow,green,blue,purple}</literal></entry>
       </row>
       <row>
-       <entry morerows="2"><literal>enum_range(anyenum, anyenum)</literal></entry>
-       <entry morerows="2">
+       <entry spanname="func" morerows="3"><literal>enum_range(anyenum, anyenum) returns anyarray</literal></entry>
+       <entry spanname="desc">
         Returns the range between the two given enum values, as an ordered
         array. The values must be from the same enum type. If the first
         parameter is null, the result will start with the first value of
@@ -8289,16 +8451,18 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
         If the second parameter is null, the result will end with the last
         value of the enum type.
        </entry>
-       <entry><literal>enum_range('orange'::rainbow, 'green'::rainbow)</literal></entry>
-       <entry><literal>{orange,yellow,green}</literal></entry>
       </row>
       <row>
-       <entry><literal>enum_range(NULL, 'green'::rainbow)</literal></entry>
-       <entry><literal>{red,orange,yellow,green}</literal></entry>
+       <entry spanname="example"><literal>enum_range('orange'::rainbow, 'green'::rainbow)</literal></entry>
+       <entry spanname="exresult"><literal>{orange,yellow,green}</literal></entry>
+      </row>
+      <row>
+       <entry spanname="example"><literal>enum_range(NULL, 'green'::rainbow)</literal></entry>
+       <entry spanname="exresult"><literal>{red,orange,yellow,green}</literal></entry>
       </row>
       <row>
-       <entry><literal>enum_range('orange'::rainbow, NULL)</literal></entry>
-       <entry><literal>{orange,yellow,green,blue,purple}</literal></entry>
+       <entry spanname="example"><literal>enum_range('orange'::rainbow, NULL)</literal></entry>
+       <entry spanname="exresult"><literal>{orange,yellow,green,blue,purple}</literal></entry>
       </row>
      </tbody>
     </tgroup>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index ceda48e..7364294 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -6798,471 +6798,682 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');

     <table id="functions-datetime-table">
      <title>Date/Time Functions</title>
-     <tgroup cols="5">
+     <tgroup cols="3">
+      <colspec colnum="1" colname="col1" colwidth="1*"/>
+      <colspec colnum="2" colname="col2" colwidth="1*"/>
+      <colspec colnum="3" colname="col3" colwidth="1*"/>
+      <spanspec spanname="func" namest="col1" nameend="col1" align="left"/>
+      <spanspec spanname="args" namest="col2" nameend="col2" align="left"/>
+      <spanspec spanname="result" namest="col3" nameend="col3" align="left"/>
+      <spanspec spanname="desc" namest="col2" nameend="col3" align="left"/>
+      <spanspec spanname="example" namest="col2" nameend="col3" align="left"/>
+      <spanspec spanname="exresult" namest="col2" nameend="col3" align="left"/>
       <thead>
        <row>
-        <entry>Function</entry>
-        <entry>Return Type</entry>
-        <entry>Description</entry>
-        <entry>Example</entry>
-        <entry>Result</entry>
+        <entry spanname="func" align="center" morerows="3">Function</entry>
+        <entry spanname="args" align="center">Argument Types</entry>
+        <entry spanname="result" align="center">Result Type</entry>
+       </row>
+       <row>
+        <entry spanname="desc" align="center">Description</entry>
+       </row>
+       <row>
+        <entry spanname="example" align="center">Example</entry>
+       </row>
+       <row>
+        <entry spanname="exresult" align="center">Example Result</entry>
        </row>
       </thead>

       <tbody>
        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>age</primary>
          </indexterm>
-         <literal><function>age(<type>timestamp</type>, <type>timestamp</type>)</function></literal>
+         <function>age</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>Subtract arguments, producing a <quote>symbolic</quote> result that
+        <entry spanname="args"><type>timestamp</type>, <type>timestamp</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Subtract arguments, producing a <quote>symbolic</quote> result that
         uses years and months, rather than just days</entry>
-        <entry><literal>age(timestamp '2001-04-10', timestamp '1957-06-13')</literal></entry>
-        <entry><literal>43 years 9 mons 27 days</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>age(timestamp '2001-04-10', timestamp '1957-06-13')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>43 years 9 mons 27 days</literal></entry>
        </row>

        <row>
-        <entry><literal><function>age(<type>timestamp</type>)</function></literal></entry>
-        <entry><type>interval</type></entry>
-        <entry>Subtract from <function>current_date</function> (at midnight)</entry>
-        <entry><literal>age(timestamp '1957-06-13')</literal></entry>
-        <entry><literal>43 years 8 mons 3 days</literal></entry>
+        <entry spanname="func" morerows="3"><function>age</function></entry>
+        <entry spanname="args"><type>timestamp</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Subtract from <function>current_date</function> (at midnight)</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>age(timestamp '1957-06-13')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>clock_timestamp</primary>
          </indexterm>
-         <literal><function>clock_timestamp()</function></literal>
+         <function>clock_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (changes during statement execution);
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (changes during statement execution);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>clock_timestamp()</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>current_date</primary>
          </indexterm>
-         <literal><function>current_date</function></literal>
+         <function>current_date</function>
         </entry>
-        <entry><type>date</type></entry>
-        <entry>Current date;
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>date</type></entry>
+       </row>
+       <row>
+         <entry spanname="desc">Current date;
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>current_date</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>current_time</primary>
          </indexterm>
-         <literal><function>current_time</function></literal>
+         <function>current_time</function>
         </entry>
-        <entry><type>time with time zone</type></entry>
-        <entry>Current time of day;
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>time with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current time of day;
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>current_time</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>current_timestamp</primary>
          </indexterm>
-         <literal><function>current_timestamp</function></literal>
+         <function>current_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (start of current transaction);
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current transaction);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>current_timestamp</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>date_part</primary>
          </indexterm>
-         <literal><function>date_part(<type>text</type>, <type>timestamp</type>)</function></literal>
+         <function>date_part</function>
         </entry>
-        <entry><type>double precision</type></entry>
-        <entry>Get subfield (equivalent to <function>extract</function>);
+        <entry spanname="args"><type>text</type>, <type>timestamp</type></entry>
+        <entry spanname="result"><type>double precision</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Get subfield (equivalent to <function>extract</function>);
          see <xref linkend="functions-datetime-extract"/>
         </entry>
-        <entry><literal>date_part('hour', timestamp '2001-02-16 20:38:40')</literal></entry>
-        <entry><literal>20</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_part('hour', timestamp '2001-02-16 20:38:40')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>20</literal></entry>
        </row>

        <row>
-        <entry><literal><function>date_part(<type>text</type>, <type>interval</type>)</function></literal></entry>
-        <entry><type>double precision</type></entry>
-        <entry>Get subfield (equivalent to
+        <entry spanname="func" morerows="3"><function>date_part</function></entry>
+        <entry spanname="args"><type>text</type>, <type>interval</type></entry>
+        <entry spanname="result"><type>double precision</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Get subfield (equivalent to
          <function>extract</function>); see <xref linkend="functions-datetime-extract"/>
         </entry>
-        <entry><literal>date_part('month', interval '2 years 3 months')</literal></entry>
-        <entry><literal>3</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_part('month', interval '2 years 3 months')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>3</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>date_trunc</primary>
          </indexterm>
-         <literal><function>date_trunc(<type>text</type>, <type>timestamp</type>)</function></literal>
+         <function>date_trunc</function>
         </entry>
-        <entry><type>timestamp</type></entry>
-        <entry>Truncate to specified precision; see <xref linkend="functions-datetime-trunc"/>
+        <entry spanname="args"><type>text</type>, <type>timestamp</type></entry>
+        <entry spanname="result"><type>timestamp</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Truncate to specified precision; see <xref linkend="functions-datetime-trunc"/>
         </entry>
-        <entry><literal>date_trunc('hour', timestamp '2001-02-16 20:38:40')</literal></entry>
-        <entry><literal>2001-02-16 20:00:00</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_trunc('hour', timestamp '2001-02-16 20:38:40')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>2001-02-16 20:00:00</literal></entry>
        </row>

        <row>
-        <entry><literal><function>date_trunc(<type>text</type>, <type>timestamp with time zone</type>,
<type>text</type>)</function></literal></entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Truncate to specified precision in the specified time zone; see <xref
linkend="functions-datetime-trunc"/>
+        <entry spanname="func" morerows="3"><function>date_trunc</function></entry>
+        <entry spanname="args"><type>text</type>, <type>timestamp with time zone</type>, <type>text</type></entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Truncate to specified precision in the specified time zone; see <xref
linkend="functions-datetime-trunc"/>
         </entry>
-        <entry><literal>date_trunc('day', timestamptz '2001-02-16 20:38:40+00', 'Australia/Sydney')</literal></entry>
-        <entry><literal>2001-02-16 13:00:00+00</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_trunc('day', timestamptz '2001-02-16 20:38:40+00',
'Australia/Sydney')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>2001-02-16 13:00:00+00</literal></entry>
        </row>

        <row>
-        <entry><literal><function>date_trunc(<type>text</type>, <type>interval</type>)</function></literal></entry>
-        <entry><type>interval</type></entry>
-        <entry>Truncate to specified precision; see <xref linkend="functions-datetime-trunc"/>
+        <entry spanname="func" morerows="3"><function>date_trunc</function></entry>
+        <entry spanname="args"><type>text</type>, <type>interval</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Truncate to specified precision; see <xref linkend="functions-datetime-trunc"/>
         </entry>
-        <entry><literal>date_trunc('hour', interval '2 days 3 hours 40 minutes')</literal></entry>
-        <entry><literal>2 days 03:00:00</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>date_trunc('hour', interval '2 days 3 hours 40 minutes')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>2 days 03:00:00</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>extract</primary>
          </indexterm>
-         <literal><function>extract</function>(<parameter>field</parameter> from
-         <type>timestamp</type>)</literal>
+         <function>extract</function>
         </entry>
-        <entry><type>double precision</type></entry>
-        <entry>Get subfield; see <xref linkend="functions-datetime-extract"/>
+        <entry spanname="args"><parameter>field</parameter> <literal>from</literal> <type>timestamp</type></entry>
+        <entry spanname="result"><type>double precision</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Get subfield; see <xref linkend="functions-datetime-extract"/>
         </entry>
-        <entry><literal>extract(hour from timestamp '2001-02-16 20:38:40')</literal></entry>
-        <entry><literal>20</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>extract(hour from timestamp '2001-02-16 20:38:40')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>20</literal></entry>
        </row>

        <row>
-        <entry><literal><function>extract</function>(<parameter>field</parameter> from
-         <type>interval</type>)</literal></entry>
-        <entry><type>double precision</type></entry>
-        <entry>Get subfield; see <xref linkend="functions-datetime-extract"/>
+        <entry spanname="func" morerows="3"><function>extract</function></entry>
+        <entry spanname="args"><parameter>field</parameter> <literal>from</literal> <type>interval</type></entry>
+        <entry spanname="result"><type>double precision</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Get subfield; see <xref linkend="functions-datetime-extract"/>
         </entry>
-        <entry><literal>extract(month from interval '2 years 3 months')</literal></entry>
-        <entry><literal>3</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>extract(month from interval '2 years 3 months')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>3</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>isfinite</primary>
          </indexterm>
-         <literal><function>isfinite(<type>date</type>)</function></literal>
+         <function>isfinite</function>
         </entry>
-        <entry><type>boolean</type></entry>
-        <entry>Test for finite date (not +/-infinity)</entry>
-        <entry><literal>isfinite(date '2001-02-16')</literal></entry>
-        <entry><literal>true</literal></entry>
+        <entry spanname="args"><type>date</type></entry>
+        <entry spanname="result"><type>boolean</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Test for finite date (not +/-infinity)</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>isfinite(date '2001-02-16')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>true</literal></entry>
        </row>

        <row>
-        <entry><literal><function>isfinite(<type>timestamp</type>)</function></literal></entry>
-        <entry><type>boolean</type></entry>
-        <entry>Test for finite time stamp (not +/-infinity)</entry>
-        <entry><literal>isfinite(timestamp '2001-02-16 21:28:30')</literal></entry>
-        <entry><literal>true</literal></entry>
+        <entry spanname="func" morerows="3"><function>isfinite</function></entry>
+        <entry spanname="args"><type>timestamp</type></entry>
+        <entry spanname="result"><type>boolean</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Test for finite time stamp (not +/-infinity)</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>isfinite(timestamp '2001-02-16 21:28:30')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>true</literal></entry>
        </row>

        <row>
-        <entry><literal><function>isfinite(<type>interval</type>)</function></literal></entry>
-        <entry><type>boolean</type></entry>
-        <entry>Test for finite interval</entry>
-        <entry><literal>isfinite(interval '4 hours')</literal></entry>
-        <entry><literal>true</literal></entry>
+        <entry spanname="func" morerows="3"><function>isfinite</function></entry>
+        <entry spanname="args"><type>interval</type></entry>
+        <entry spanname="result"><type>boolean</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Test for finite interval</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>isfinite(interval '4 hours')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>true</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>justify_days</primary>
          </indexterm>
-         <literal><function>justify_days(<type>interval</type>)</function></literal>
+         <function>justify_days</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>Adjust interval so 30-day time periods are represented as months</entry>
-        <entry><literal>justify_days(interval '35 days')</literal></entry>
-        <entry><literal>1 mon 5 days</literal></entry>
+        <entry spanname="args"><type>interval</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Adjust interval so 30-day time periods are represented as months</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>justify_days(interval '35 days')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>1 mon 5 days</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>justify_hours</primary>
          </indexterm>
-         <literal><function>justify_hours(<type>interval</type>)</function></literal>
+         <function>justify_hours</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>Adjust interval so 24-hour time periods are represented as days</entry>
-        <entry><literal>justify_hours(interval '27 hours')</literal></entry>
-        <entry><literal>1 day 03:00:00</literal></entry>
+        <entry spanname="args"><type>interval</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Adjust interval so 24-hour time periods are represented as days</entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>justify_hours(interval '27 hours')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>1 day 03:00:00</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>justify_interval</primary>
          </indexterm>
-         <literal><function>justify_interval(<type>interval</type>)</function></literal>
+         <function>justify_interval</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>Adjust interval using <function>justify_days</function> and <function>justify_hours</function>, with
additionalsign adjustments</entry> 
-        <entry><literal>justify_interval(interval '1 mon -1 hour')</literal></entry>
-        <entry><literal>29 days 23:00:00</literal></entry>
+        <entry spanname="args"><type>interval</type></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Adjust interval using <function>justify_days</function> and
<function>justify_hours</function>,with additional sign adjustments</entry> 
+       </row>
+       <row>
+        <entry spanname="example"><literal>justify_interval(interval '1 mon -1 hour')</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>29 days 23:00:00</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>localtime</primary>
          </indexterm>
-         <literal><function>localtime</function></literal>
+         <function>localtime</function>
         </entry>
-        <entry><type>time</type></entry>
-        <entry>Current time of day;
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>time</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current time of day;
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>localtime</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>localtimestamp</primary>
          </indexterm>
-         <literal><function>localtimestamp</function></literal>
+         <function>localtimestamp</function>
         </entry>
-        <entry><type>timestamp</type></entry>
-        <entry>Current date and time (start of current transaction);
+        <entry spanname="args">none (written without parentheses)</entry>
+        <entry spanname="result"><type>timestamp</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current transaction);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>localtimestamp</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>make_date</primary>
          </indexterm>
-         <literal>
-            <function>
-             make_date(<parameter>year</parameter> <type>int</type>,
-             <parameter>month</parameter> <type>int</type>,
-             <parameter>day</parameter> <type>int</type>)
-            </function>
-         </literal>
+         <function>make_date</function>
         </entry>
-        <entry><type>date</type></entry>
-        <entry>
+        <entry spanname="args"><parameter>year</parameter> <type>int</type>,
+         <parameter>month</parameter> <type>int</type>,
+         <parameter>day</parameter> <type>int</type></entry>
+        <entry spanname="result"><type>date</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create date from year, month and day fields
         </entry>
-        <entry><literal>make_date(2013, 7, 15)</literal></entry>
-        <entry><literal>2013-07-15</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_date(2013, 7, 15)</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>2013-07-15</literal></entry>
        </row>

        <row>
-        <entry>
-         <indexterm>
+        <entry spanname="func" morerows="3"><indexterm>
           <primary>make_interval</primary>
          </indexterm>
-         <literal>
-          <function>
-           make_interval(<parameter>years</parameter> <type>int</type> DEFAULT 0,
-           <parameter>months</parameter> <type>int</type> DEFAULT 0,
-           <parameter>weeks</parameter> <type>int</type> DEFAULT 0,
-           <parameter>days</parameter> <type>int</type> DEFAULT 0,
-           <parameter>hours</parameter> <type>int</type> DEFAULT 0,
-           <parameter>mins</parameter> <type>int</type> DEFAULT 0,
-           <parameter>secs</parameter> <type>double precision</type> DEFAULT 0.0)
-          </function>
-         </literal>
+         <function>make_interval</function>
         </entry>
-        <entry><type>interval</type></entry>
-        <entry>
+        <entry spanname="args"><optional> <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>int</type>
+         <optional>, <type>double precision</type>
+         </optional></optional></optional></optional></optional></optional></optional></entry>
+        <entry spanname="result"><type>interval</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create interval from years, months, weeks, days, hours, minutes and
-         seconds fields
+         seconds fields, each of which can default to zero
         </entry>
-        <entry><literal>make_interval(days => 10)</literal></entry>
-        <entry><literal>10 days</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_interval(days => 10)</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>10 days</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>make_time</primary>
          </indexterm>
-         <literal>
-          <function>
-           make_time(<parameter>hour</parameter> <type>int</type>,
-           <parameter>min</parameter> <type>int</type>,
-           <parameter>sec</parameter> <type>double precision</type>)
-          </function>
-         </literal>
+         <function>make_time</function>
         </entry>
-        <entry><type>time</type></entry>
-        <entry>
+        <entry spanname="args"><parameter>hour</parameter> <type>int</type>,
+         <parameter>min</parameter> <type>int</type>,
+         <parameter>sec</parameter> <type>double precision</type></entry>
+        <entry spanname="result"><type>time</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create time from hour, minute and seconds fields
         </entry>
-        <entry><literal>make_time(8, 15, 23.5)</literal></entry>
-        <entry><literal>08:15:23.5</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_time(8, 15, 23.5)</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>08:15:23.5</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>make_timestamp</primary>
          </indexterm>
-         <literal>
-          <function>
-           make_timestamp(<parameter>year</parameter> <type>int</type>,
-           <parameter>month</parameter> <type>int</type>,
-           <parameter>day</parameter> <type>int</type>,
-           <parameter>hour</parameter> <type>int</type>,
-           <parameter>min</parameter> <type>int</type>,
-           <parameter>sec</parameter> <type>double precision</type>)
-          </function>
-         </literal>
+         <function>make_timestamp</function>
         </entry>
-        <entry><type>timestamp</type></entry>
-        <entry>
+        <entry spanname="args"><parameter>year</parameter> <type>int</type>,
+         <parameter>month</parameter> <type>int</type>,
+         <parameter>day</parameter> <type>int</type>,
+         <parameter>hour</parameter> <type>int</type>,
+         <parameter>min</parameter> <type>int</type>,
+         <parameter>sec</parameter> <type>double precision</type></entry>
+        <entry spanname="result"><type>timestamp</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create timestamp from year, month, day, hour, minute and seconds fields
         </entry>
-        <entry><literal>make_timestamp(2013, 7, 15, 8, 15, 23.5)</literal></entry>
-        <entry><literal>2013-07-15 08:15:23.5</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_timestamp(2013, 7, 15, 8, 15, 23.5)</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>2013-07-15 08:15:23.5</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>make_timestamptz</primary>
          </indexterm>
-         <literal>
-          <function>
-           make_timestamptz(<parameter>year</parameter> <type>int</type>,
-           <parameter>month</parameter> <type>int</type>,
-           <parameter>day</parameter> <type>int</type>,
-           <parameter>hour</parameter> <type>int</type>,
-           <parameter>min</parameter> <type>int</type>,
-           <parameter>sec</parameter> <type>double precision</type>,
-           <optional> <parameter>timezone</parameter> <type>text</type> </optional>)
-          </function>
-         </literal>
+         <function>make_timestamptz</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>
+        <entry spanname="args"><parameter>year</parameter> <type>int</type>,
+         <parameter>month</parameter> <type>int</type>,
+         <parameter>day</parameter> <type>int</type>,
+         <parameter>hour</parameter> <type>int</type>,
+         <parameter>min</parameter> <type>int</type>,
+         <parameter>sec</parameter> <type>double precision</type>,
+         <optional> <parameter>timezone</parameter> <type>text</type> </optional></entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">
          Create timestamp with time zone from year, month, day, hour, minute
          and seconds fields; if <parameter>timezone</parameter> is not
          specified, the current time zone is used
         </entry>
-        <entry><literal>make_timestamptz(2013, 7, 15, 8, 15, 23.5)</literal></entry>
-        <entry><literal>2013-07-15 08:15:23.5+01</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>make_timestamptz(2013, 7, 15, 8, 15, 23.5)</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>2013-07-15 08:15:23.5+01</literal></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>now</primary>
          </indexterm>
-         <literal><function>now()</function></literal>
+         <function>now</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (start of current transaction);
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current transaction);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>now()</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>statement_timestamp</primary>
          </indexterm>
-         <literal><function>statement_timestamp()</function></literal>
+         <function>statement_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (start of current statement);
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current statement);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>statement_timestamp()</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>timeofday</primary>
          </indexterm>
-         <literal><function>timeofday()</function></literal>
+         <function>timeofday</function>
         </entry>
-        <entry><type>text</type></entry>
-        <entry>Current date and time
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>text</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time
          (like <function>clock_timestamp</function>, but as a <type>text</type> string);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>timeofday()</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
        </row>

        <row>
-        <entry>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>transaction_timestamp</primary>
          </indexterm>
-         <literal><function>transaction_timestamp()</function></literal>
+         <function>transaction_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Current date and time (start of current transaction);
+        <entry spanname="args">none</entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Current date and time (start of current transaction);
          see <xref linkend="functions-datetime-current"/>
         </entry>
-        <entry></entry>
-        <entry></entry>
        </row>
        <row>
-        <entry>
+        <entry spanname="example"><literal>transaction_timestamp()</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><replaceable>variable</replaceable></entry>
+       </row>
+       <row>
+        <entry spanname="func" morerows="3">
          <indexterm>
           <primary>to_timestamp</primary>
          </indexterm>
-         <literal><function>to_timestamp(<type>double precision</type>)</function></literal>
+         <function>to_timestamp</function>
         </entry>
-        <entry><type>timestamp with time zone</type></entry>
-        <entry>Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to
+        <entry spanname="args"><type>double precision</type></entry>
+        <entry spanname="result"><type>timestamp with time zone</type></entry>
+       </row>
+       <row>
+        <entry spanname="desc">Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to
          timestamp</entry>
-        <entry><literal>to_timestamp(1284352323)</literal></entry>
-        <entry><literal>2010-09-13 04:32:03+00</literal></entry>
+       </row>
+       <row>
+        <entry spanname="example"><literal>to_timestamp(1284352323)</literal></entry>
+       </row>
+       <row>
+        <entry spanname="exresult"><literal>2010-09-13 04:32:03+00</literal></entry>
        </row>
       </tbody>
      </tgroup>
@@ -8236,52 +8447,74 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple

   <table id="functions-enum-table">
     <title>Enum Support Functions</title>
-    <tgroup cols="4">
+    <tgroup cols="2">
+     <colspec colnum="1" colname="col1" colwidth="1*"/>
+     <colspec colnum="2" colname="col2" colwidth="2*"/>
+     <spanspec spanname="func" namest="col1" nameend="col1" align="left"/>
+     <spanspec spanname="desc" namest="col2" nameend="col2" align="left"/>
+     <spanspec spanname="example" namest="col2" nameend="col2" align="left"/>
+     <spanspec spanname="exresult" namest="col2" nameend="col2" align="left"/>
      <thead>
       <row>
-       <entry>Function</entry>
-       <entry>Description</entry>
-       <entry>Example</entry>
-       <entry>Example Result</entry>
+       <entry spanname="func" align="center" morerows="2">Function</entry>
+       <entry spanname="desc" align="center">Description</entry>
+      </row>
+      <row>
+       <entry spanname="example" align="center">Example</entry>
+      </row>
+      <row>
+       <entry spanname="exresult" align="center">Result</entry>
       </row>
      </thead>
      <tbody>
       <row>
-       <entry>
+       <entry spanname="func" morerows="2">
          <indexterm>
           <primary>enum_first</primary>
          </indexterm>
-         <literal>enum_first(anyenum)</literal>
+         <literal>enum_first(anyenum) returns anyenum</literal>
        </entry>
-       <entry>Returns the first value of the input enum type</entry>
-       <entry><literal>enum_first(null::rainbow)</literal></entry>
-       <entry><literal>red</literal></entry>
+       <entry spanname="desc">Returns the first value of the input enum type</entry>
       </row>
       <row>
-       <entry>
+       <entry spanname="example"><literal>enum_first(null::rainbow)</literal></entry>
+      </row>
+      <row>
+       <entry spanname="exresult"><literal>red</literal></entry>
+      </row>
+      <row>
+       <entry spanname="func" morerows="2">
          <indexterm>
           <primary>enum_last</primary>
          </indexterm>
-         <literal>enum_last(anyenum)</literal>
+         <literal>enum_last(anyenum) returns anyenum</literal>
        </entry>
-       <entry>Returns the last value of the input enum type</entry>
-       <entry><literal>enum_last(null::rainbow)</literal></entry>
-       <entry><literal>purple</literal></entry>
+       <entry spanname="desc">Returns the last value of the input enum type</entry>
       </row>
       <row>
-       <entry>
+       <entry spanname="example"><literal>enum_last(null::rainbow)</literal></entry>
+      </row>
+      <row>
+       <entry spanname="exresult"><literal>purple</literal></entry>
+      </row>
+      <row>
+       <entry spanname="func" morerows="2">
          <indexterm>
           <primary>enum_range</primary>
          </indexterm>
-         <literal>enum_range(anyenum)</literal>
+         <literal>enum_range(anyenum) returns anyarray</literal>
        </entry>
-       <entry>Returns all values of the input enum type in an ordered array</entry>
-       <entry><literal>enum_range(null::rainbow)</literal></entry>
-       <entry><literal>{red,orange,yellow,green,blue,purple}</literal></entry>
+       <entry spanname="desc">Returns all values of the input enum type in an ordered array</entry>
+      </row>
+      <row>
+       <entry spanname="example"><literal>enum_range(null::rainbow)</literal></entry>
+      </row>
+      <row>
+       <entry spanname="exresult"><literal>{red,orange,yellow,green,blue,purple}</literal></entry>
       </row>
       <row>
-       <entry morerows="2"><literal>enum_range(anyenum, anyenum)</literal></entry>
-       <entry morerows="2">
+       <entry spanname="func" morerows="6"><literal>enum_range(anyenum, anyenum) returns anyarray</literal></entry>
+       <entry spanname="desc">
         Returns the range between the two given enum values, as an ordered
         array. The values must be from the same enum type. If the first
         parameter is null, the result will start with the first value of
@@ -8289,16 +8522,24 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
         If the second parameter is null, the result will end with the last
         value of the enum type.
        </entry>
-       <entry><literal>enum_range('orange'::rainbow, 'green'::rainbow)</literal></entry>
-       <entry><literal>{orange,yellow,green}</literal></entry>
       </row>
       <row>
-       <entry><literal>enum_range(NULL, 'green'::rainbow)</literal></entry>
-       <entry><literal>{red,orange,yellow,green}</literal></entry>
+       <entry spanname="example"><literal>enum_range('orange'::rainbow, 'green'::rainbow)</literal></entry>
+      </row>
+      <row>
+       <entry spanname="exresult"><literal>{orange,yellow,green}</literal></entry>
+      </row>
+      <row>
+       <entry spanname="example"><literal>enum_range(NULL, 'green'::rainbow)</literal></entry>
+      </row>
+      <row>
+       <entry spanname="exresult"><literal>{red,orange,yellow,green}</literal></entry>
+      </row>
+      <row>
+       <entry spanname="example"><literal>enum_range('orange'::rainbow, NULL)</literal></entry>
       </row>
       <row>
-       <entry><literal>enum_range('orange'::rainbow, NULL)</literal></entry>
-       <entry><literal>{orange,yellow,green,blue,purple}</literal></entry>
+       <entry spanname="exresult"><literal>{orange,yellow,green,blue,purple}</literal></entry>
       </row>
      </tbody>
     </tgroup>

В списке pgsql-docs по дате отправления:

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: Duplicating website's formatting in local doc builds
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: Duplicating website's formatting in local doc builds