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

Commit7fe23c8

Browse files
committed
Doc: spell out comparison behaviors for the date/time types.
The behavior of cross-type comparisons among date/time data types wasnot really explained anywhere. You could probably infer it if yourecognized the applicability of comments elsewhere about datatypeconversions, but it seems worthy of explicit documentation.Per bug #16797 from Dana Burd.Discussion:https://postgr.es/m/16797-f264b0b980b53b8b@postgresql.org
1 parentd46eb10 commit7fe23c8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6459,6 +6459,21 @@ SELECT regexp_matches('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
64596459
linkend="datatype-datetime">.
64606460
</para>
64616461

6462+
<para>
6463+
In addition, the usual comparison operators shown in
6464+
<xref linkend="functions-comparison-table"> are available for the
6465+
date/time types. Dates and timestamps (with or without time zone) are
6466+
all comparable, while times (with or without time zone) and intervals
6467+
can only be compared to other values of the same data type. When
6468+
comparing a timestamp without time zone to a timestamp with time zone,
6469+
the former value is assumed to be given in the time zone specified by
6470+
the <xref linkend="guc-timezone"> configuration parameter, and is
6471+
rotated to UTC for comparison to the latter value (which is already
6472+
in UTC internally). Similarly, a date value is assumed to represent
6473+
midnight in the <varname>TimeZone</varname> zone when comparing it
6474+
to a timestamp.
6475+
</para>
6476+
64626477
<para>
64636478
All the functions and operators described below that take <type>time</type> or <type>timestamp</type>
64646479
inputs actually come in two variants: one that takes <type>time with time zone</type> or <type>timestamp

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp