Commit a29d815a authored by Bruce Momjian's avatar Bruce Momjian

Improve gettimeofday() documentation.

Karl O. Pinc
parent 0fc9b260
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.261 2005/06/28 05:08:50 tgl Exp $ $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.262 2005/06/29 01:52:56 momjian Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -5786,15 +5786,6 @@ SELECT LOCALTIMESTAMP; ...@@ -5786,15 +5786,6 @@ SELECT LOCALTIMESTAMP;
<function>CURRENT_TIMESTAMP</function>. <function>CURRENT_TIMESTAMP</function>.
</para> </para>
<para>
There is also the function <function>timeofday()</function>, which for historical
reasons returns a <type>text</type> string rather than a <type>timestamp</type> value:
<screen>
SELECT timeofday();
<lineannotation>Result: </lineannotation><computeroutput>Sat Feb 17 19:07:32.000126 2001 EST</computeroutput>
</screen>
</para>
<para> <para>
It is important to know that It is important to know that
<function>CURRENT_TIMESTAMP</function> and related functions return <function>CURRENT_TIMESTAMP</function> and related functions return
...@@ -5803,8 +5794,7 @@ SELECT timeofday(); ...@@ -5803,8 +5794,7 @@ SELECT timeofday();
the intent is to allow a single transaction to have a consistent the intent is to allow a single transaction to have a consistent
notion of the <quote>current</quote> time, so that multiple notion of the <quote>current</quote> time, so that multiple
modifications within the same transaction bear the same modifications within the same transaction bear the same
time stamp. <function>timeofday()</function> time stamp.
returns the wall-clock time and does advance during transactions.
</para> </para>
<note> <note>
...@@ -5814,6 +5804,18 @@ SELECT timeofday(); ...@@ -5814,6 +5804,18 @@ SELECT timeofday();
</para> </para>
</note> </note>
<para>
There is also the function <function>timeofday()</function> which
returns the wall-clock time and advances during transactions. For
historical reasons <function>timeofday()</function> returns a
<type>text</type> string rather than a <type>timestamp</type>
value:
<screen>
SELECT timeofday();
<lineannotation>Result: </lineannotation><computeroutput>Sat Feb 17 19:07:32.000126 2001 EST</computeroutput>
</screen>
</para>
<para> <para>
All the date/time data types also accept the special literal value All the date/time data types also accept the special literal value
<literal>now</literal> to specify the current date and time. Thus, <literal>now</literal> to specify the current date and time. Thus,
......
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