Bad Docs example
time '05:00' + interval '2 hours' <== Shown below beside the '-' Name.
date '2001-09-28' + interval '1 hour' <== also shown beside the '-'
Name.
The results look appropriate however, so flipping the +'s to -'s
should be enough.
Table 4-16. Date/Time Operators
Name Example Result
+ timestamp '2001-09-28 01:00' + interval '23 hours' timestamp
'2001-09-29 00:00'
+ date '2001-09-28' + interval '1 hour' timestamp '2001-09-28
01:00'
+ time '01:00' + interval '3 hours' time '04:00'
- timestamp '2001-09-28 23:00' - interval '23 hours' timestamp
'2001-09-28'
- date '2001-09-28' + interval '1 hour' timestamp '2001-09-27
23:00'
- time '05:00' + interval '2 hours' time '03:00'
- interval '2 hours' - time '05:00' time '03:00:00'
* interval '1 hour' * int '3' interval '03:00'
/ interval '1 hour' / int '3' interval '00:20'
--
Rod Taylor
Your eyes are weary from staring at the CRT. You feel sleepy. Notice
how restful it is to watch the cursor blink. Close your eyes. The
opinions stated above are yours. You cannot imagine why you ever felt
otherwise.
Thanks. Attached patch applied. Good eye.
---------------------------------------------------------------------------
Rod Taylor wrote:
time '05:00' + interval '2 hours' <== Shown below beside the '-' Name.
date '2001-09-28' + interval '1 hour' <== also shown beside the '-'
Name.The results look appropriate however, so flipping the +'s to -'s
should be enough.Table 4-16. Date/Time Operators
Name Example Result + timestamp '2001-09-28 01:00' + interval '23 hours' timestamp '2001-09-29 00:00' + date '2001-09-28' + interval '1 hour' timestamp '2001-09-28 01:00' + time '01:00' + interval '3 hours' time '04:00' - timestamp '2001-09-28 23:00' - interval '23 hours' timestamp '2001-09-28' - date '2001-09-28' + interval '1 hour' timestamp '2001-09-27 23:00' - time '05:00' + interval '2 hours' time '03:00' - interval '2 hours' - time '05:00' time '03:00:00' * interval '1 hour' * int '3' interval '03:00' / interval '1 hour' / int '3' interval '00:20'--
Rod TaylorYour eyes are weary from staring at the CRT. You feel sleepy. Notice
how restful it is to watch the cursor blink. Close your eyes. The
opinions stated above are yours. You cannot imagine why you ever felt
otherwise.---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Attachments:
/bjm/difftext/plainDownload
? bookindex.sgml
? setindex.sgml
? catalogs.gif
? connections.gif
Index: func.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.91
diff -c -r1.91 func.sgml
*** func.sgml 2002/01/20 22:19:55 1.91
--- func.sgml 2002/01/25 02:38:20
***************
*** 2554,2566 ****
<row>
<entry> <literal>-</literal> </entry>
! <entry><type>date</type> '2001-09-28' + <type>interval</type> '1 hour'</entry>
<entry><type>timestamp</type> '2001-09-27 23:00'</entry>
</row>
<row>
<entry> <literal>-</literal> </entry>
! <entry><type>time</type> '05:00' + <type>interval</type> '2 hours'</entry>
<entry><type>time</type> '03:00'</entry>
</row>
--- 2554,2566 ----
<row>
<entry> <literal>-</literal> </entry>
! <entry><type>date</type> '2001-09-28' - <type>interval</type> '1 hour'</entry>
<entry><type>timestamp</type> '2001-09-27 23:00'</entry>
</row>
<row>
<entry> <literal>-</literal> </entry>
! <entry><type>time</type> '05:00' - <type>interval</type> '2 hours'</entry>
<entry><type>time</type> '03:00'</entry>
</row>