From 7e700e75eeb8c8e1a506f819bc1ee0acc9a07a3c Mon Sep 17 00:00:00 2001 From: tgl Date: Wed, 8 Jul 2009 17:21:55 +0000 Subject: [PATCH] Add missing HOUR TO SECOND option to list of possible INTERVAL field sets, as noted by Sebastien Flaesch. Also update the claim that we simply throw away fields outside this set --- that got changed later to only discard less-significant fields. --- doc/src/sgml/datatype.sgml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 1f323be2c0..f7ee8e9f22 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1524,11 +1524,11 @@ SELECT b, char_length(b) FROM test2; DAY TO MINUTE DAY TO SECOND HOUR TO MINUTE + HOUR TO SECOND MINUTE TO SECOND - Input falling outside the specified set of fields is silently discarded. Note that if both fields and - precision are specified, the + p are specified, the fields must include SECOND, since the precision applies only to the seconds. @@ -2468,11 +2468,15 @@ P years-months-days < When writing an interval constant with a fields - specification, or when assigning to an interval column that was defined - with a fields specification, the interpretation of + specification, or when assigning a string to an interval column that was + defined with a fields specification, the interpretation of unmarked quantities depends on the fields. For example INTERVAL '1' YEAR is read as 1 year, whereas - INTERVAL '1' means 1 second. + INTERVAL '1' means 1 second. Also, field values + to the right of the least significant field allowed by the + fields specification are silently discarded. For + example, writing INTERVAL '1 day 2:03:04' HOUR TO MINUTE + results in dropping the seconds field, but not the day field. -- 2.11.4.GIT