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--