Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53e7229

Browse files
committed
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 throwaway fields outside this set --- that got changed later to only discardless-significant fields.
1 parentdf20667 commit53e7229

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎doc/src/sgml/datatype.sgml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.239 2009/06/1721:58:49 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.240 2009/07/08 17:21:55 tgl Exp $ -->
22

33
<chapter id="datatype">
44
<title id="datatype-title">Data Types</title>
@@ -1524,11 +1524,11 @@ SELECT b, char_length(b) FROM test2;
15241524
DAY TO MINUTE
15251525
DAY TO SECOND
15261526
HOUR TO MINUTE
1527+
HOUR TO SECOND
15271528
MINUTE TO SECOND
15281529
</programlisting>
1529-
Input falling outside the specified set of fields is silently discarded.
15301530
Note that if both <replaceable>fields</replaceable> and
1531-
<replaceable>precision</replaceable> are specified, the
1531+
<replaceable>p</replaceable> are specified, the
15321532
<replaceable>fields</replaceable> must include <literal>SECOND</>,
15331533
since the precision applies only to the seconds.
15341534
</para>
@@ -2468,11 +2468,15 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
24682468

24692469
<para>
24702470
When writing an interval constant with a <replaceable>fields</>
2471-
specification, or when assigning to an interval column that was defined
2472-
with a <replaceable>fields</> specification, the interpretation of
2471+
specification, or when assigninga stringto an interval column that was
2472+
definedwith a <replaceable>fields</> specification, the interpretation of
24732473
unmarked quantities depends on the <replaceable>fields</>. For
24742474
example <literal>INTERVAL '1' YEAR</> is read as 1 year, whereas
2475-
<literal>INTERVAL '1'</> means 1 second.
2475+
<literal>INTERVAL '1'</> means 1 second. Also, field values
2476+
<quote>to the right</> of the least significant field allowed by the
2477+
<replaceable>fields</> specification are silently discarded. For
2478+
example, writing <literal>INTERVAL '1 day 2:03:04' HOUR TO MINUTE</>
2479+
results in dropping the seconds field, but not the day field.
24762480
</para>
24772481

24782482
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp