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

Commit5894e7e

Browse files
committed
Add items:
> * Prevent to_char() on interval from returning meaningless values>> For example, to_char('1 month', 'mon') is meaningless. Basically,> most date-related parameters to to_char() are meaningless for> intervals because interval is not anchored to a date.>> * Allow to_char() on interval values to accumulate the highest unit> requested>> o to_char(INTERVAL '1 hour 5 minutes', 'MI') => 65> o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600> o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20> o to_char(INTERVAL '3 years 5 months','MM') => 41>> Some special format flag would be required to request such> accumulation. Such functionality could also be added to EXTRACT.> Prevent accumulation that crosses the month/day boundary because of> the uneven number of days in a month.>
1 parentb63990c commit5894e7e

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

‎doc/TODO

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
PostgreSQL TODO List
33
====================
44
Current maintainer:Bruce Momjian (pgman@candle.pha.pa.us)
5-
Last updated:Mon May2 14:27:06 EDT 2005
5+
Last updated:Sat May7 00:24:29 EDT 2005
66

77
The most recent version of this document can be viewed at
88
http://www.postgresql.org/docs/faqs.TODO.html.
@@ -188,6 +188,25 @@ Data Types
188188
zero the bits
189189
* Prevent INET cast to CIDR from droping netmask, SELECT '1.1.1.1'::inet::cidr
190190
* Add 'tid != tid ' operator for use in corruption recovery
191+
* Prevent to_char() on interval from returning meaningless values
192+
193+
For example, to_char('1 month', 'mon') is meaningless. Basically,
194+
most date-related parameters to to_char() are meaningless for
195+
intervals because interval is not anchored to a date.
196+
197+
* Allow to_char() on interval values to accumulate the highest unit
198+
requested
199+
200+
o to_char(INTERVAL '1 hour 5 minutes', 'MI') => 65
201+
o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600
202+
o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
203+
o to_char(INTERVAL '3 years 5 months','MM') => 41
204+
205+
Some special format flag would be required to request such
206+
accumulation. Such functionality could also be added to EXTRACT.
207+
Prevent accumulation that crosses the month/day boundary because of
208+
the uneven number of days in a month.
209+
191210
* Add ISO INTERVAL handling
192211
o Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO SECOND
193212
o Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH

‎doc/src/FAQ/TODO.html

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<bodybgcolor="#FFFFFF"text="#000000"link="#FF0000"vlink="#A00000"alink="#0000FF">
99
<h1><aname="section_1">PostgreSQL TODO List</a></h1>
1010
<p>Current maintainer: Bruce Momjian (<ahref="mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</a>)<br/>
11-
Last updated:Mon May2 14:27:06 EDT 2005
11+
Last updated:Sat May7 00:24:29 EDT 2005
1212
</p>
1313
<p>The most recent version of this document can be viewed at<br/>
1414
<ahref="http://www.postgresql.org/docs/faqs.TODO.html">http://www.postgresql.org/docs/faqs.TODO.html</a>.
@@ -176,7 +176,27 @@ <h1><a name="section_3">Data Types</a></h1>
176176
zero the bits
177177
</li><li>Prevent INET cast to CIDR from droping netmask, SELECT '<ahref="telnet://1.1.1.1">1.1.1.1</a>'::inet::cidr
178178
</li><li>Add 'tid != tid ' operator for use in corruption recovery
179-
</li><li>Add ISO INTERVAL handling
179+
</li><li>Prevent to_char() on interval from returning meaningless values
180+
<p> For example, to_char('1 month', 'mon') is meaningless. Basically,
181+
most date-related parameters to to_char() are meaningless for
182+
intervals because interval is not anchored to a date.
183+
</p>
184+
</li><li>Allow to_char() on interval values to accumulate the highest unit
185+
requested
186+
<ul>
187+
<li>to_char(INTERVAL '1 hour 5 minutes', 'MI') =&gt; 65
188+
</li><li>to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&gt; 2600
189+
</li><li>to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&gt; 0:1:19:20
190+
</li><li>to_char(INTERVAL '3 years 5 months','MM') =&gt; 41
191+
</li></ul>
192+
</li></ul>
193+
<p> Some special format flag would be required to request such<br/>
194+
accumulation. Such functionality could also be added to EXTRACT.<br/>
195+
Prevent accumulation that crosses the month/day boundary because of<br/>
196+
the uneven number of days in a month.
197+
</p>
198+
<ul>
199+
<li>Add ISO INTERVAL handling
180200
<ul>
181201
<li>Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO SECOND
182202
</li><li>Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp