diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-07-30 14:52:04 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-07-30 14:52:04 +0000 |
commit | b2b6548c79eb63faf1d0939893b3bf183d5410a1 (patch) | |
tree | e3cec6fc1fb0f4774844385394152ed7a8c3ef8f /doc/src | |
parent | 5b0bfec414ca5b7569371ae5885769b2576cdedf (diff) | |
download | postgresql-b2b6548c79eb63faf1d0939893b3bf183d5410a1.tar.gz postgresql-b2b6548c79eb63faf1d0939893b3bf183d5410a1.zip |
Please find attached diffs for documentation and simple regression
tests for the new interval->day changes. I added tests for
justify_hours() and justify_days() to interval.sql, as they take
interval input and produce interval output. If there's a more
appropriate place for them, please let me know.
Michael Glaesemann
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 5c6092e4245..55a5a63ae59 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.273 2005/07/29 14:46:56 momjian Exp $ +$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.274 2005/07/30 14:52:04 momjian Exp $ PostgreSQL documentation --> @@ -4903,6 +4903,24 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); such pair. </para> + <para> + When adding an <type>interval</type> value to (or subtracting an + <type>interval</type> value from) a <type>timestamp with time zone</type> + value, the days component advances (or decrements) the date of the + <type>timestamp with time zone<type> by the indicated number of days. + Across daylight saving time changes (with the session tiem zone set to a + time zone that recognizes DST), this means <literal>interval '1 day'</literal> + does not necessarily equal <literal>interval '24 hours'</literal>. + For example, with the session time zone set to <literal>CST7CDT</literal> + <literal>timestamp with time zone '2005-04-02 12:00-07' + interval '1 day' </literal> + will produce <literal>timestamp with time zone '2005-04-03 12:00-06'</literal>, + while adding <literal>interval '24 hours'</literal> to the same initial + <type>timestamp with time zone</type> produces + <literal>timestamp with time zone '2005-04-03 13:00-06'</literal>, as there is + a change in daylight saving time at <literal>2005-04-03 02:00</literal> in time zone + <literal>CST7CDT</literal>. + </para> + <table id="operators-datetime-table"> <title>Date/Time Operators</title> |