Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
78ec1cb0
Commit
78ec1cb0
authored
Dec 23, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Type interval takes a precision, too.
parent
d1396696
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
doc/src/sgml/datatype.sgml
doc/src/sgml/datatype.sgml
+22
-11
No files found.
doc/src/sgml/datatype.sgml
View file @
78ec1cb0
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.
79 2001/12/21 03:54:02 thomas
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.
80 2001/12/23 20:21:37 tgl
Exp $
-->
<chapter id="datatype">
...
...
@@ -1290,7 +1290,7 @@ SELECT b, char_length(b) FROM test2;
<entry>1 microsecond / 14 digits</entry>
</row>
<row>
<entry><type>interval</type></entry>
<entry><type>interval
[ (<replaceable>p</replaceable>) ]
</type></entry>
<entry>for time intervals</entry>
<entry>12 bytes</entry>
<entry>-178000000 years</entry>
...
...
@@ -1327,14 +1327,19 @@ SELECT b, char_length(b) FROM test2;
</para>
<para>
<type>time</type> and <type>timestamp</type> both accept an
optional precision field <replaceable>p</replaceable> which
determines the number of digits retained beyond the seconds
decimal point. By default, there is no explicit bound on precision
and the actual precision is determined by the underlying double
precision floating point number used to store values in seconds
<type>time</type>, <type>timestamp</type>, and <type>interval</type>
accept an
optional precision value <replaceable>p</replaceable> which
specifies the number of fractional digits retained in the seconds
field. By default, there is no explicit bound on precision. The
effective limit of precision is determined by the underlying double
precision floating point number used to store values (in seconds
for <type>interval</type> and
in seconds since 2000-01-01 for <type>timestamp</type>.
in seconds since 2000-01-01 for <type>timestamp</type>). The
useful range of <replaceable>p</replaceable> is from 0 to about
6 for <type>timestamp</type>, but may be more for <type>interval</type>.
The system will accept <replaceable>p</replaceable> ranging from
0 to 13.
</para>
<para>
...
...
@@ -1846,7 +1851,7 @@ January 8 04:05:06 1999 PST
</sect3>
<sect3>
<title><type>interval</type></title>
<title><type>interval
[ ( <replaceable>precision</replaceable> ) ]
</type></title>
<indexterm>
<primary>interval</primary>
...
...
@@ -1860,7 +1865,7 @@ January 8 04:05:06 1999 PST
@ Quantity Unit [Quantity Unit...] [Direction]
</programlisting>
where: <literal>Quantity</literal> is a
n integer (possibly signed);
where: <literal>Quantity</literal> is a
number (possibly signed),
<literal>Unit</literal> is <literal>second</literal>,
<literal>minute</literal>, <literal>hour</literal>, <literal>day</literal>,
<literal>week</literal>, <literal>month</literal>, <literal>year</literal>,
...
...
@@ -1877,6 +1882,12 @@ January 8 04:05:06 1999 PST
explicit unit markings. For example, <literal>'1 12:59:10'</> is read
the same as <literal>'1 day 12 hours 59 min 10 sec'</>.
</para>
<para>
The optional precision
<replaceable>p</replaceable> should be between 0 and 13, and
defaults to the precision of the input literal.
</para>
</sect3>
<sect3>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment