Timestamp Fractions Problem - Mailing list pgsql-sql
From | Florian Mader |
---|---|
Subject | Timestamp Fractions Problem |
Date | |
Msg-id | 000001c25b34$cf82d480$0300a8c0@FPCm Whole thread Raw |
Responses |
Re: Timestamp Fractions Problem
|
List | pgsql-sql |
<div class="Section1"><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font face="Courier New"size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">Hello,</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">I have got a really big problem with queries for Timestamp-Values.</span></font><pclass="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font face="CourierNew" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"><span style="mso-tab-count:1"> </span>select mod_ from TMODUL</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font face="Courier New"size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">This query, sent to a DBII returns the value </span></font><p class="MsoNormal"style="mso-layout-grid-align:none;text-autospace:none"><font face="Courier New" size="2"><span lang="EN-GB"style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"><span style="mso-tab-count:1"> </span>2002-09-11 17:47:30.017000</span></font><pclass="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font face="CourierNew" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">The same query sent to a PostgreSQL returns the value</span></font><pclass="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font face="Courier New" size="2"><spanlang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"><span style="mso-tab-count:1"> </span>2002-09-11 </span></font><fontface="Courier New"><span lang="EN-GB" style="mso-bidi-font-size:10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">17:47:30</span></font><fontface="Courier New"><span lang="EN-GB" style="mso-bidi-font-size:10.0pt;font-family:"CourierNew"; mso-ansi-language:EN-GB"></span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">I know that the fractions are also stored in the PostgreSQL, becausethe query</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font face="CourierNew" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"><span style="mso-tab-count:1"> </span><span class="GramE">select</span>to_char(mod_, 'YYYY-MM-DD HH24:MI:SS.US') from TMODUL</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><spanclass="GramE"><font face="Courier New" size="2"><span lang="EN-GB"style="font-size: 10.0pt;mso-bidi-font-size:10.0pt;font-family:"Courier New";mso-ansi-language: EN-GB">returns</span></font></span><font face="Courier New"><span lang="EN-GB" style="mso-bidi-font-size:10.0pt;font-family:"CourierNew";mso-ansi-language: EN-GB"> also</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font face="CourierNew" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"><span style="mso-tab-count:1"> </span>2002-09-11 17:47:30.017000</span></font><pclass="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font face="CourierNew" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">What's the property I have to set, so that an ordinary "selectmod_ from TMODUL" also returns fractions?</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">Platform Info</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">OS: Win2000</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">Emulator: cygWin</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">PostgreSQL: 7.2.1</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB"> </span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span lang="EN-GB" style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB">Does anybody have an idea?</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:DE">TIA</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:DE">Florian</span></font><p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><fontface="Courier New" size="2"><span style="font-size:10.0pt;mso-bidi-font-size: 10.0pt;font-family:"Courier New";mso-ansi-language:DE"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><spanlang="DE-AT" style="font-size: 10.0pt;mso-bidi-font-size:10.0pt;font-family:Arial"> </span></font></div>