From zagato.gekko@gmail.com Sat Nov 22 01:39:58 2008 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 041DE650471 for ; Fri, 21 Nov 2008 21:39:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43797-01 for ; Fri, 21 Nov 2008 21:39:54 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by mail.postgresql.org (Postfix) with ESMTP id 876AC65046E for ; Fri, 21 Nov 2008 21:39:54 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id c7so714486nfi.23 for ; Fri, 21 Nov 2008 17:39:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=TOqO5lDAPr3OLCySRYA00YfbTR2k+OamtllrQIUmHrY=; b=unMEYXdDgzlt2RZaJvKYziO0jB/vkalQaLXjhRMtrBYMUPKh9iyNSJDUtJ0kgElWez vmgtivHvX383UWq2491+As+dlx8aALL0mRIw5ouj4NCwBVRWGcTQkoN8b+AExvt0u8g4 Aqhr2Z78awAuPIEMw4hWdTwFlvEM5pHjD/zI8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=pTYQQKJ3iftMOTXhYhnU5VzftAC+RCz06Z0FSfjOYpjlQSVkZYvxnHwGzkToIeNjC6 kHiZzAo6fDSIlNME6wRcY/SsUU0+VFZUcQTQ4rVfZKJnBkuZxHUckJoaOWUHLT20gelc udJE/sIr/p+RXTbmMGf1HKLCnjb2VRo8lS8oU= Received: by 10.210.58.13 with SMTP id g13mr1216591eba.60.1227317992774; Fri, 21 Nov 2008 17:39:52 -0800 (PST) Received: by 10.210.111.17 with HTTP; Fri, 21 Nov 2008 17:39:52 -0800 (PST) Message-ID: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com> Date: Fri, 21 Nov 2008 20:39:52 -0500 From: Zagato To: pgsql-general@postgresql.org Subject: Interval Format MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_143409_15422148.1227317992763" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200811/1119 X-Sequence-Number: 140837 ------=_Part_143409_15422148.1227317992763 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi everyone... im looking for some help with the interval format between two diferents versions of postgres.... I have instaled in my old server postgres 8.0.3 and in my new one postgres 8.3.5... Everything in both looks works nice but i notice a little difference that is taking my crazy.. I have som SQL that in 8.0.3 do: # SELECT '32 hours'::INTERVAL; interval ----------------- @ 1 day 8 hours (1 row) And in 8.3.5 do: seg_veh2=# SELECT '@ 32 hours'::INTERVAL; interval ------------ @ 32 hours (1 row) Why i unable to get my old style of interval, i really need to see the day part.... im using datestyle german in both.... im try with "SET IntervalStyle TO..." but i get this error: ERROR: unrecognized configuration parameter "intervalstyle" looking throw the forums i get that this new param its just for postgres 8.4... So.. how can i recover my "days" part... Any help it appreciate... thanks :D Alan Jairo Acosta -- Farewell. http://www.youtube.com/zagatogekko ruby << __EOF__ puts [ 111, 116, 97, 103, 97, 90 ].collect{|v| v.chr}.join.reverse __EOF__ ------=_Part_143409_15422148.1227317992763 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi everyone... im looking for some help with the interval format between two diferents versions of postgres....
I have instaled in my old server postgres 8.0.3 and in my new one postgres 8.3.5...
Everything in both looks works nice but i notice a little difference that is taking my crazy..
I have som SQL that in 8.0.3 do:
# SELECT '32 hours'::INTERVAL;
    interval
-----------------
 @ 1 day 8 hours
(1 row)

And in 8.3.5 do:
seg_veh2=# SELECT '@ 32 hours'::INTERVAL;
  interval
------------
 @ 32 hours
(1 row)

Why i unable to get my old style of interval, i really need to see the day part.... im using datestyle german in both.... im try with "SET IntervalStyle TO..." but i get this error:
ERROR:  unrecognized configuration parameter "intervalstyle"
looking throw the forums i get that this new param its just for postgres 8.4...
So.. how can i recover my "days" part...

Any help it appreciate... thanks :D

Alan Jairo Acosta

--
Farewell.
http://www.youtube.com/zagatogekko
ruby << __EOF__
 puts [ 111, 116, 97, 103, 97, 90 ].collect{|v| v.chr}.join.reverse
__EOF__
------=_Part_143409_15422148.1227317992763-- From zagato.gekko@gmail.com Sat Nov 22 01:40:34 2008 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A65326504AD for ; Fri, 21 Nov 2008 21:40:34 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43896-02-8 for ; Fri, 21 Nov 2008 21:40:30 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mail.postgresql.org (Postfix) with ESMTP id 18498650493 for ; Fri, 21 Nov 2008 21:40:28 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k40so274988ugc.7 for ; Fri, 21 Nov 2008 17:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=hddlRWLlTmll9KxnkQ9q/wxszTODSj6zSZ69ZdSGJC0=; b=jfEVbYepC5BiMv18cBWeWiV0gSpWgWJ8vNMitsNG9PstIXZgTfX6ZlQPqAWfGXXkPs iIzNwz+NjNR1ti/1YD3Su5RPNGhvWyQVt66rOfapAvGv1RyXMX4+RO5i4vSlfNGM9NKo rHqxfxXO8t+3XbCmWE8e5k4WP57REF+8hBGr0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=cwI91K1w9uRagKRZMvLwm4V8GE0nmfIdTrLtWwaZasriw+PJt4RDEUprpDrNV89Eny su8h1YBqnPYCR2pzCO2uPuWQ0H2frJBwKRER8WvzhVaF/o0Sob+3ifpnKFIWS0hubyu0 D/2NTeuLjU1Vk4XP/qKroM4u1BGd++cUulV+g= Received: by 10.210.87.14 with SMTP id k14mr1192744ebb.159.1227318027112; Fri, 21 Nov 2008 17:40:27 -0800 (PST) Received: by 10.210.111.17 with HTTP; Fri, 21 Nov 2008 17:40:27 -0800 (PST) Message-ID: <98028b00811211740r44025235nf81578e1e9436f1d@mail.gmail.com> Date: Fri, 21 Nov 2008 20:40:27 -0500 From: Zagato To: pgsql-admin@postgresql.org Subject: Interval Format In-Reply-To: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_143414_6304287.1227318027120" References: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200811/132 X-Sequence-Number: 30786 ------=_Part_143414_6304287.1227318027120 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi everyone... im looking for some help with the interval format between two diferents versions of postgres.... I have instaled in my old server postgres 8.0.3 and in my new one postgres 8.3.5... Everything in both looks works nice but i notice a little difference that is taking my crazy.. I have som SQL that in 8.0.3 do: # SELECT '32 hours'::INTERVAL; interval ----------------- @ 1 day 8 hours (1 row) And in 8.3.5 do: seg_veh2=# SELECT '@ 32 hours'::INTERVAL; interval ------------ @ 32 hours (1 row) Why i unable to get my old style of interval, i really need to see the day part.... im using datestyle german in both.... im try with "SET IntervalStyle TO..." but i get this error: ERROR: unrecognized configuration parameter "intervalstyle" looking throw the forums i get that this new param its just for postgres 8.4... So.. how can i recover my "days" part... Any help it appreciate... thanks :D Alan Jairo Acosta ------=_Part_143414_6304287.1227318027120 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi everyone... im looking for some help with the interval format between two diferents versions of postgres....
I have instaled in my old server postgres 8.0.3 and in my new one postgres 8.3.5...
Everything in both looks works nice but i notice a little difference that is taking my crazy..
I have som SQL that in 8.0.3 do:
# SELECT '32 hours'::INTERVAL;
    interval
-----------------
 @ 1 day 8 hours
(1 row)

And in 8.3.5 do:
seg_veh2=# SELECT '@ 32 hours'::INTERVAL;
  interval
------------
 @ 32 hours
(1 row)

Why i unable to get my old style of interval, i really need to see the day part.... im using datestyle german in both.... im try with "SET IntervalStyle TO..." but i get this error:
ERROR:  unrecognized configuration parameter "intervalstyle"
looking throw the forums i get that this new param its just for postgres 8.4...
So.. how can i recover my "days" part...

Any help it appreciate... thanks :D

Alan Jairo Acosta

------=_Part_143414_6304287.1227318027120-- From rm_pg@cheapcomplexdevices.com Sat Nov 22 01:56:53 2008 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0BEF8650471 for ; Fri, 21 Nov 2008 21:56:53 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 46009-08 for ; Fri, 21 Nov 2008 21:56:50 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp100.biz.mail.mud.yahoo.com (smtp100.biz.mail.mud.yahoo.com [68.142.201.176]) by mail.postgresql.org (Postfix) with SMTP id 29BB965046E for ; Fri, 21 Nov 2008 21:56:49 -0400 (AST) Received: (qmail 63404 invoked from network); 22 Nov 2008 01:56:48 -0000 Received: from unknown (HELO ?192.168.5.110?) (rm_pg@76.202.60.199 with plain) by smtp100.biz.mail.mud.yahoo.com with SMTP; 22 Nov 2008 01:56:47 -0000 X-YMail-OSG: jxa4I0kVM1kT_ltKWT_7eWCUwIQ08.6FI9kNlqvV53rNq95Wp6n7eH9uEhkEHkFxK6btYH8XvWsvRrQRz2VAz1rvbA2qeP_snddmvw90IFb_RfuiZ0.5Lt5RHZwrs90Iw4dPuutIdweMDwThXWUQHok40A2jFewGF5NmqFaE X-Yahoo-Newman-Property: ymail-3 Message-ID: <492766DF.2050902@cheapcomplexdevices.com> Date: Fri, 21 Nov 2008 17:56:47 -0800 From: Ron Mayer User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Zagato CC: pgsql-general@postgresql.org Subject: Re: Interval Format References: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com> In-Reply-To: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/1120 X-Sequence-Number: 140838 Zagato wrote: > I have som SQL that in 8.0.3 do: > # SELECT '32 hours'::INTERVAL; > interval > ----------------- > @ 1 day 8 hours > > And in 8.3.5 do: > seg_veh2=# SELECT '@ 32 hours'::INTERVAL; > interval > ------------ > @ 32 hours > > Why i unable to get my old style of interval, i really need to see the > day part.... im using datestyle german in both.... im try with "SET > IntervalStyle TO..." but i get this error: Even IntervalStyle won't help you here; since recent releases consider the values "1 day 8 hours" as distinct from "32 hours" (because they are at certain times of the year in some timezones where days are 25 hours, etc). > So.. how can i recover my "days" part... If you tell it what time of year you are thinking of this trick can work: dish=# set datestyle to german; SET dish=# select '2001-01-01'::timestamp + (interval '32 hours') - '2001-01-01'::timestamp; ?column? ----------------- @ 1 day 8 hours (1 row) > > Any help it appreciate... thanks :D From zagato.gekko@gmail.com Sat Nov 22 02:28:54 2008 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C9B9465043C for ; Fri, 21 Nov 2008 22:28:54 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54344-05 for ; Fri, 21 Nov 2008 22:28:52 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mail.postgresql.org (Postfix) with ESMTP id B6D8065036B for ; Fri, 21 Nov 2008 22:28:51 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id c7so719211nfi.23 for ; Fri, 21 Nov 2008 18:28:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=+cnOewoT0sJTpGBc5DzRYbcO1+ftCIm+cLKT3MNojaM=; b=WAaHGOtLVwl6TS7pY/ouSbbBWbbzK1on6S5KrsSUPINujx8+cQbFGTzc9EpHJh10re 1tnns5+CK2yCAF6q1lujovvIUyqmXEXh7bPrshO8OEVjt0znqX6tdqrxVSvPOdnUXcdN nDVK8zxSxaz8Hk7lu5DaBPRJYMILcOvaqDzDA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=n5N4juHXqi13rEfca19pm51vuwgt4mIgg2EQ/SJsBmXOyKqX3aYMD5efXralVDYX3w S5gQc0iCf4VcQ66lqHppTvaSewH+pk8o3ysvxCm7FNpiXskWq4Cj02rqTFtuPoPYNXhh LgzMtddG7OYBdnD7s0nXleO1dL44F4jD2qB1I= Received: by 10.210.66.13 with SMTP id o13mr1246087eba.113.1227320929799; Fri, 21 Nov 2008 18:28:49 -0800 (PST) Received: by 10.210.111.17 with HTTP; Fri, 21 Nov 2008 18:28:49 -0800 (PST) Message-ID: <98028b00811211828m2fdac1aq5be928ec819180f@mail.gmail.com> Date: Fri, 21 Nov 2008 21:28:49 -0500 From: Zagato To: "Ron Mayer" Subject: Re: Interval Format Cc: pgsql-general@postgresql.org In-Reply-To: <492766DF.2050902@cheapcomplexdevices.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_143591_31370922.1227320929805" References: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com> <492766DF.2050902@cheapcomplexdevices.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200811/1121 X-Sequence-Number: 140839 ------=_Part_143591_31370922.1227320929805 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi.. thanks for the answer.... well this work in the test sql, but this needs to rewrite all the SQL in my PHP application :-p Jejej... can i set a deatul time year in postgres.conf or with a single SET ... ? Thanks.. Alan Acosta On Fri, Nov 21, 2008 at 8:56 PM, Ron Mayer wrote: > Zagato wrote: > >> I have som SQL that in 8.0.3 do: >> # SELECT '32 hours'::INTERVAL; >> interval >> ----------------- >> @ 1 day 8 hours >> >> And in 8.3.5 do: >> seg_veh2=# SELECT '@ 32 hours'::INTERVAL; >> interval >> ------------ >> @ 32 hours >> >> Why i unable to get my old style of interval, i really need to see the day >> part.... im using datestyle german in both.... im try with "SET >> IntervalStyle TO..." but i get this error: >> > > Even IntervalStyle won't help you here; since recent releases consider > the values "1 day 8 hours" as distinct from "32 hours" (because > they are at certain times of the year in some timezones > where days are 25 hours, etc). > > So.. how can i recover my "days" part... >> > > If you tell it what time of year you are thinking of this trick can work: > > dish=# set datestyle to german; > SET > dish=# select '2001-01-01'::timestamp + (interval '32 hours') - > '2001-01-01'::timestamp; > ?column? > ----------------- > @ 1 day 8 hours > (1 row) > > > >> Any help it appreciate... thanks :D >> > > ------=_Part_143591_31370922.1227320929805 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi.. thanks for the answer.... well this work in the test sql, but this needs to rewrite all the SQL in my PHP application :-p Jejej... can i set a deatul time year in postgres.conf or with a single SET ... ?

Thanks..

Alan Acosta

On Fri, Nov 21, 2008 at 8:56 PM, Ron Mayer <rm_pg@cheapcomplexdevices.com> wrote:
Zagato wrote:
I have som SQL that in 8.0.3 do:
# SELECT '32 hours'::INTERVAL;
   interval
-----------------
 @ 1 day 8 hours

And in 8.3.5 do:
seg_veh2=# SELECT '@ 32 hours'::INTERVAL;
 interval
------------
 @ 32 hours

Why i unable to get my old style of interval, i really need to see the day part.... im using datestyle german in both.... im try with "SET IntervalStyle TO..." but i get this error:

Even IntervalStyle won't help you here; since recent releases consider
the values "1 day 8 hours" as distinct from "32 hours" (because
they are at certain times of the year in some timezones
where days are 25 hours, etc).


So.. how can i recover my "days" part...

If you tell it what time of year you are thinking of this trick can work:

dish=# set datestyle to german;
SET
dish=# select  '2001-01-01'::timestamp + (interval '32 hours') - '2001-01-01'::timestamp;
   ?column?

-----------------
 @ 1 day 8 hours
(1 row)



Any help it appreciate... thanks :D




------=_Part_143591_31370922.1227320929805-- From francois.figarola@laposte.net Sat Nov 22 05:51:30 2008 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4BC7D64FCC3 for ; Sat, 22 Nov 2008 01:51:30 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 07174-01 for ; Sat, 22 Nov 2008 01:51:27 -0400 (AST) X-Greylist: delayed 00:06:16.328534 by SQLgrey-1.7.6 Received: from smtp21.orange.fr (smtp21.orange.fr [80.12.242.46]) by mail.postgresql.org (Postfix) with ESMTP id 6777564FCC0 for ; Sat, 22 Nov 2008 01:51:27 -0400 (AST) Received: from smtp21.orange.fr (mwinf2113 [10.232.7.41]) by mwinf2105.orange.fr (SMTP Server) with ESMTP id 320441C01F11 for ; Sat, 22 Nov 2008 06:45:14 +0100 (CET) Received: from [192.168.66.1] (AMontpellier-158-1-45-171.w90-37.abo.wanadoo.fr [90.37.140.171]) by mwinf2113.orange.fr (SMTP Server) with ESMTP id 599B31C00086; Sat, 22 Nov 2008 06:45:08 +0100 (CET) X-ME-UUID: 20081122054508367.599B31C00086@mwinf2113.orange.fr Message-ID: <49279C63.8090909@laposte.net> Date: Sat, 22 Nov 2008 06:45:07 +0100 From: Francois Figarola User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) MIME-Version: 1.0 To: Zagato Cc: pgsql-admin@postgresql.org Subject: Re: Interval Format References: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com> <98028b00811211740r44025235nf81578e1e9436f1d@mail.gmail.com> In-Reply-To: <98028b00811211740r44025235nf81578e1e9436f1d@mail.gmail.com> X-Enigmail-Version: 0.95.0 OpenPGP: id=39E5CD79 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/133 X-Sequence-Number: 30787 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, Zagato a écrit : > Hi everyone... im looking for some help with the interval format > between two diferents versions of postgres.... > I have instaled in my old server postgres 8.0.3 and in my new one > postgres 8.3.5. .. > Everything in both looks works nice but i notice a little difference > that is taking my crazy.. > I have som SQL that in 8.0.3 do: > # SELECT '32 hours'::INTERVAL; > interval > ----------------- > @ 1 day 8 hours > (1 row) > > And in 8.3.5 do: > seg_veh2=# SELECT '@ 32 hours'::INTERVAL; > interval > ------------ > @ 32 hours > (1 row) If you really want your interval in normalized form (like days , hours parts...) with versions from 8.1 and newers, you must use the justify_* function : |SELECT justify_hours('@ 32 hours'::INTERVAL); will give you : justify_hours - ---------------- 1 day 08:00:00 and SELECT justify_days('45 days @ 32 hours'::INTERVAL); give justify_days - ------------------------ 1 mon 15 days 32:00:00 or global function ||SELECT justify_interval('45 days @ 32 hours'::INTERVAL); will give justify_interval - ------------------------ 1 mon 16 days 08:00:00 | > > Why i unable to get my old style of interval, i really need to see > the day part.... im using datestyle german in both.... im try with > "SET IntervalStyle TO..." but i get this error: > ERROR: unrecognized configuration parameter "intervalstyle" > looking throw the forums i get that this new param its just for > postgres 8.4... > So.. how can i recover my "days" part... > > Any help it appreciate... thanks :D Hope it can helps ! > > Alan Jairo Acosta > Regards, François Figarola. - -- - ---------------------------- L'éducation, c'est un peu comme une maladie sexuellement transmissible. Ca rend inapte à des tas de besognes, puis ça démange d'en faire profiter les autres. Terry Pratchett in "Le père Porcher" (coll. Les Annales du Disque-Monde). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkknnGMACgkQXRu8MjnlzXks1wCaA+RIqhPk5BuGJeJ/jTn24Sg1 OPcAn39TO8vBYRuWcBuyysPl6+L0cD4L =3Ww3 -----END PGP SIGNATURE----- From zagato.gekko@gmail.com Sat Nov 22 06:08:22 2008 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B638864FE81 for ; Sat, 22 Nov 2008 02:08:22 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 12305-02 for ; Sat, 22 Nov 2008 02:08:17 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mail.postgresql.org (Postfix) with ESMTP id 4EE4D64FCF5 for ; Sat, 22 Nov 2008 02:08:17 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id c7so736996nfi.23 for ; Fri, 21 Nov 2008 22:08:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=KnJMZ5PcIsaXg3B25otfcQ0/MiSE+/xDhCEVE/G5OZg=; b=tGSHR6027//mY46BPFPb8v5m5NWona6SDpVed9lLGXuhkQc98JbQ67HM8iXLFiXX9R +0B74xkjt4qZg+Nh3DylOThixA78YOpgKrkQwh0nlpX4bn/8wsoBuFq5D7FjUf1uaUkF smAjjn6/BePzhPLAUrJIz6ZM37qiZfkYbG9QY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=dSRmf36w+GZxUF09f4aOCMs5XBOX6Rf4a27PKZwHW+Rje48V1SGmP9xAPdBhPjWSgH j95YLUt3TsYxASKrKCt51zukXCs1mpZhZ40o0ykkgd6bKswlQjJEzx02kfuhhHAA3V21 UyM8sxfSiOww0hWeQExXoc91h/IeIe6R0HzFo= Received: by 10.210.51.10 with SMTP id y10mr1386997eby.87.1227334095689; Fri, 21 Nov 2008 22:08:15 -0800 (PST) Received: by 10.210.111.17 with HTTP; Fri, 21 Nov 2008 22:08:15 -0800 (PST) Message-ID: <98028b00811212208p5cc28e78ucf688640c3ec6f84@mail.gmail.com> Date: Sat, 22 Nov 2008 01:08:15 -0500 From: Zagato To: "Francois Figarola" Subject: Re: Interval Format Cc: pgsql-admin@postgresql.org In-Reply-To: <49279C63.8090909@laposte.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_144980_1405123.1227334095671" References: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com> <98028b00811211740r44025235nf81578e1e9436f1d@mail.gmail.com> <49279C63.8090909@laposte.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200811/134 X-Sequence-Number: 30788 ------=_Part_144980_1405123.1227334095671 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Douh..... !!! Jejej... well i think that if not possible to use a some kind of default_justify_inteval, then i will try to update my SQLs... Thanks :D Alan Jairo Acosta On Sat, Nov 22, 2008 at 12:45 AM, Francois Figarola < francois.figarola@laposte.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > Zagato a =E9crit : > > Hi everyone... im looking for some help with the interval format > > between two diferents versions of postgres.... > > I have instaled in my old server postgres 8.0.3 and in my new one > > postgres 8.3.5. .. > > Everything in both looks works nice but i notice a little difference > > that is taking my crazy.. > > I have som SQL that in 8.0.3 do: > > # SELECT '32 hours'::INTERVAL; > > interval > > ----------------- > > @ 1 day 8 hours > > (1 row) > > > > And in 8.3.5 do: > > seg_veh2=3D# SELECT '@ 32 hours'::INTERVAL; > > interval > > ------------ > > @ 32 hours > > (1 row) > If you really want your interval in normalized form (like days , hours > parts...) > with versions from 8.1 and newers, you must use the justify_* function : > > |SELECT justify_hours('@ 32 hours'::INTERVAL); > > will give you : > > justify_hours > - ---------------- > 1 day 08:00:00 > > and > > SELECT justify_days('45 days @ 32 hours'::INTERVAL); > > give > > justify_days > - ------------------------ > 1 mon 15 days 32:00:00 > > or global function > > ||SELECT justify_interval('45 days @ 32 hours'::INTERVAL); > > will give > > justify_interval > - ------------------------ > 1 mon 16 days 08:00:00 > > | > > > > Why i unable to get my old style of interval, i really need to see > > the day part.... im using datestyle german in both.... im try with > > "SET IntervalStyle TO..." but i get this error: > > ERROR: unrecognized configuration parameter "intervalstyle" > > looking throw the forums i get that this new param its just for > > postgres 8.4... > > So.. how can i recover my "days" part... > > > > Any help it appreciate... thanks :D > Hope it can helps ! > > > > Alan Jairo Acosta > > > Regards, Fran=E7ois Figarola. > > - -- > - ---------------------------- > > L'=E9ducation, c'est un peu comme une maladie sexuellement transmissible. > Ca rend inapte =E0 des tas de besognes, puis =E7a d=E9mange d'en faire > profiter les autres. > Terry Pratchett in "Le p=E8re Porcher" (coll. Les Annales du Disque-Monde= ). > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkknnGMACgkQXRu8MjnlzXks1wCaA+RIqhPk5BuGJeJ/jTn24Sg1 > OPcAn39TO8vBYRuWcBuyysPl6+L0cD4L > =3D3Ww3 > -----END PGP SIGNATURE----- > > ------=_Part_144980_1405123.1227334095671 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Douh..... !!! Jejej... well i think that if not possible to use a some kind= of default_justify_inteval, then i will try to update my SQLs...

T= hanks :D

Alan Jairo Acosta

On Sat,= Nov 22, 2008 at 12:45 AM, Francois Figarola <francois.figarola@laposte.net= > wrote:
-----BEGIN PGP SI= GNED MESSAGE-----
Hash: SHA1

Hello,

Zagato a =E9crit :
> Hi everyone... im looking for some help with the= interval format
> between two diferents versions of postgres....
> I have instaled in my old server postgres 8.0.3 and in my new one
> postgres 8.3.5. = <http://8.3.5./>..
> Everything in both looks works nice but i notice= a little difference
> that is taking my crazy..
> I have som SQL that in 8.0.3 do:
> # SELECT '32 hours'::INTERVAL;
>     interval
> -----------------
>  @ 1 day 8 hours
> (1 row)
>
> And in 8.3.5 do:
> seg_veh2=3D# SELECT '@ 32 hours'::INTERVAL;
>   interval
> ------------
>  @ 32 hours
> (1 row)
If you really want your interval in normalized form (like days , hour= s
parts...)
with versions from 8.1 and newers, you must use the justify_* function :
|SELECT justify_hours('@ 32 hours'::INTERVAL);

will give you :

 justify_hours
- ----------------
 1 day 08:00:00

and

SELECT justify_days('45 days @ 32 hours'::INTERVAL);

give

     justify_days
- ------------------------
 1 mon 15 days 32:00:00

or global function

||SELECT justify_interval('45 days @ 32 hours'::INTERVAL);

will give

   justify_interval
- ------------------------
 1 mon 16 days 08:00:00

|
>
> Why i unable to get my old style of interval, i really need to see
> the day part.... im using datestyle german in both.... im try with
> "SET IntervalStyle TO..." but i get this error:
> ERROR:  unrecognized configuration parameter "intervalstyle&= quot;
> looking throw the forums i get that this new param its just for
> postgres 8.4...
> So.. how can i recover my "days" part...
>
> Any help it appreciate... thanks :D
Hope it can helps !
>
> Alan Jairo Acosta
>
Regards, Fran=E7ois Figarola.

- --
- ----------------------------

L'=E9ducation, c'est un peu comme une maladie sexuellement transmis= sible.
Ca rend inapte =E0 des tas de besognes, puis =E7a d=E9mange d'en faire<= br> profiter les autres.
Terry Pratchett in "Le p=E8re Porcher" (coll. Les Annales du Disq= ue-Monde).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkknnGMACgkQXRu8MjnlzXks1wCaA+RIqhPk5BuGJeJ/jTn24Sg1
OPcAn39TO8vBYRuWcBuyysPl6+L0cD4L
=3D3Ww3
-----END PGP SIGNATURE-----




------=_Part_144980_1405123.1227334095671--