From: | Zagato <zagato(dot)gekko(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Interval Format |
Date: | 2008-11-22 02:31:36 |
Message-ID: | 98028b00811211831l62041ca1ne4f4e8c5088e5abb@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi.... this seems to works... but this will need to rewrite all my sql inPHP
that uses interval.... can i make this default in postgres.conf or something
similar...
Thanks...
Alan Jairo Acosta
On Fri, Nov 21, 2008 at 9:15 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Zagato <zagato(dot)gekko(at)gmail(dot)com> writes:
> > 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,
>
> Because '1 day' isn't really the same thing as '24 hours', at least not
> if you live anywhere that they have daylight savings time.
>
> You can probably get the behavior you want by passing the value through
> justify_hours(), which does the conversion assuming 1 day == 24 hours.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | John DeSoi | 2008-11-22 15:48:11 | Re: simple text parsing function |
Previous Message | Tom Lane | 2008-11-22 02:16:51 | Re: JOIN results of refcursor functions |