Index: func.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/func.sgml,v
retrieving revision 1.214
diff -c -r1.214 func.sgml
*** func.sgml	12 Jul 2004 20:23:47 -0000	1.214
--- func.sgml	2 Aug 2004 13:35:45 -0000
***************
*** 4920,4925 ****
--- 4920,4942 ----
  	<entry><literal>3</literal></entry>
         </row>
  
+ 
+        <row>
+ 	<entry><literal><function>epoch_to_timestamp</function>(<type>integer</type>)</literal></entry>
+ 	<entry><type>timestamp</type></entry>
+ 	<entry>Conversion from UNIX epoch</entry>
+ 	<entry><literal>epoch_to_timestamp(200070000)</literal></entry>
+ 	<entry><literal>1976-05-04 15:00:00</literal></entry>
+        </row>
+ 
+        <row>
+ 	<entry><literal><function>epoch_to_timestamptz</function>(<type>double precision</type>)</literal></entry>
+ 	<entry><type>timestamp with time zone</type></entry>
+ 	<entry>Conversion from UNIX epoch</entry>
+ 	<entry></entry>
+ 	<entry></entry>
+        </row>
+ 
         <row>
  	<entry><literal><function>isfinite</function>(<type>timestamp</type>)</literal></entry>
  	<entry><type>boolean</type></entry>
***************
*** 5369,5374 ****
--- 5386,5428 ----
  
    </sect2>
  
+   <sect2 id="functions-datetime-epoch-to-timestamp">
+    <title>
+     <function>epoch_to_timestamp</function>, 
+     <function>epoch_to_timestamptz</function>
+    </title>
+ 
+    <para>
+    The <function>epoch_to_timestamp</function> function converts 
+    UNIX epoch timestamp (seconds from 1970-01-01 UTC) to <type>timestamp 
+    without time zone</type>. The <function>epoch_to_timestamptz</function> 
+    function accepts a <type>double precision</type> argument and returns 
+    <type>timestamp with time zone</type>, allowing compatibility with 
+    <function>extract</function>, which returns 
+    <type>double precision</type> values.
+    </para>
+    
+   <para>
+   <synopsis>
+   epoch_to_timestamp(<replaceable>source</replaceable>)
+   </synopsis>
+     <replaceable>source</replaceable> is an <type>integer</type> value 
+     or expression. <function>epoch_to_timestamp</function> returns a value 
+     of <type>timestamp without time zone</type>.
+   </para>
+ 
+   <para>
+   <synopsis>
+   epoch_to_timestamptz(<replaceable>source</replaceable>)
+   </synopsis>
+     <replaceable>source</replaceable> is a <type>double precision</type> value 
+     or expression. (Values of <type>integer</type> are cast automatically.)
+     <function>epoch_to_timestamptz</function> returns a value of 
+     <type>timestamp with time zone</type>.
+   </para>
+ 
+   </sect2>
+ 
    <sect2 id="functions-datetime-trunc">
     <title><function>date_trunc</function></title>
  
