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

Commit96b85f1

Browse files
committed
Fix documentation to specify the correct range of timezone offsets for
type time with time zone, ie, +/- 13:59 not +/- 12:00. Also some minorwording improvements.
1 parent4d20df3 commit96b85f1

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

‎doc/src/sgml/datatype.sgml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.162 2005/10/15 01:47:11 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.163 2005/10/22 19:33:57 tgl Exp $
33
-->
44

55
<chapter id="datatype">
@@ -1367,16 +1367,16 @@ SELECT b, char_length(b) FROM test2;
13671367
<entry><type>time [ (<replaceable>p</replaceable>) ] [ without time zone ]</type></entry>
13681368
<entry>8 bytes</entry>
13691369
<entry>times of day only</entry>
1370-
<entry>00:00:00.00</entry>
1370+
<entry>00:00:00</entry>
13711371
<entry>24:00:00</entry>
13721372
<entry>1 microsecond / 14 digits</entry>
13731373
</row>
13741374
<row>
13751375
<entry><type>time [ (<replaceable>p</replaceable>) ] with time zone</type></entry>
13761376
<entry>12 bytes</entry>
13771377
<entry>times of day only, with time zone</entry>
1378-
<entry>00:00:00.00+12</entry>
1379-
<entry>24:00:00-12</entry>
1378+
<entry>00:00:00+1359</entry>
1379+
<entry>24:00:00-1359</entry>
13801380
<entry>1 microsecond / 14 digits</entry>
13811381
</row>
13821382
</tbody>
@@ -1759,19 +1759,22 @@ January 8 04:05:06 1999 PST
17591759

17601760
<para>
17611761
The <acronym>SQL</acronym> standard differentiates <type>timestamp without time zone</type>
1762-
and <type>timestamp with time zone</type> literals by theexistence of a
1763-
<quote>+</quote>; or <quote>-</quote>. Hence, according to the standard,
1762+
and <type>timestamp with time zone</type> literals by thepresence of a
1763+
<quote>+</quote> or <quote>-</quote>. Hence, according to the standard,
17641764
<programlisting>TIMESTAMP '2004-10-19 10:23:54'</programlisting>
17651765
is a <type>timestamp without time zone</type>, while
17661766
<programlisting>TIMESTAMP '2004-10-19 10:23:54+02'</programlisting>
17671767
is a <type>timestamp with time zone</type>.
1768-
<productname>PostgreSQL</productname>
1769-
differs from the standard by requiring that <type>timestamp with time zone</type>
1770-
literals be explicitly typed:
1768+
<productname>PostgreSQL</productname> never examines the content of a
1769+
literal string before determining its type, and therefore will treat
1770+
both of the above as <type>timestamp without time zone</type>. To
1771+
ensure that a literal is treated as <type>timestamp with time
1772+
zone</type>, give it the correct explicit type:
17711773
<programlisting>TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'</programlisting>
1772-
If a literal is not explicitly indicated as being of <type>timestamp with time zone</type>,
1773-
<productname>PostgreSQL</productname> will silently ignore any time zone indication in the literal.
1774-
That is, the resulting date/time value is derived from the date/time
1774+
In a literal that has been decided to be <type>timestamp without time
1775+
zone</type>, <productname>PostgreSQL</productname> will silently ignore
1776+
any time zone indication.
1777+
That is, the resulting value is derived from the date/time
17751778
fields in the input value, and is not adjusted for time zone.
17761779
</para>
17771780

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp