Andrew - Supernews wrote:
> On 2005-10-26, Tom Lane <[EMAIL PROTECTED]> wrote:
> > Andrew - Supernews <[EMAIL PROTECTED]> writes:
> >> Um, what? Under what conditions is it permissable for simple arithmetic on
> >> (only) timestamptz values (which may have originated in different timezones
> >> nei
On 2005-10-26, Tom Lane <[EMAIL PROTECTED]> wrote:
> Andrew - Supernews <[EMAIL PROTECTED]> writes:
>> Um, what? Under what conditions is it permissable for simple arithmetic on
>> (only) timestamptz values (which may have originated in different timezones
>> neither of which is the current one) to
Andrew - Supernews <[EMAIL PROTECTED]> writes:
> Um, what? Under what conditions is it permissable for simple arithmetic on
> (only) timestamptz values (which may have originated in different timezones
> neither of which is the current one) to be dependent on the current timezone
> setting?
Timest
Bruce Momjian writes:
> I saw a lot of disussion because I forgot to specify that my tests were
> for EST5EDT, but what about the use of interval_justify_hours() in
> timestamp_mi(). Is this something we want to change?
It's too late to mess with it for 8.1, but see my previous message
proposing
Thanks for all this discussion, fixing, etc. I'm currently having
"issues" getting postgres' date/time functions to do what I want. You
have obviously spotted some of the reasons for this.
Many of my issues disappear when I use 8.1, but it's still in beta. Is
it safe for me to use 8.1 in pro
I saw a lot of disussion because I forgot to specify that my tests were
for EST5EDT, but what about the use of interval_justify_hours() in
timestamp_mi(). Is this something we want to change?
---
Bruce Momjian wrote:
> Klin
John R Pierce wrote:
> >>test=> select
> >>test-> ('2005-10-30 13:22:00-05'::timestamptz -
> >>test(> '2005-10-29 13:22:00-04'::timestamptz);
> >> ?column?
> >>--
> >> 25:00:00
> >>(1 row)
> >
> >
> > Is that actually the correct answer?
> >
> > Disregarding
On 2005-10-26, Klint Gore <[EMAIL PROTECTED]> wrote:
> [sorry about the previous email, I quoted the wrong bit and clicked the
> wrong button]
>
> On Tue, 25 Oct 2005 23:41:54 -0400 (EDT), Bruce Momjian
> wrote:
>> test=> select
>> test-> ('2005-10-30 13:22:00-05'::timestamptz -
>> t
On 2005-10-26, Tom Lane <[EMAIL PROTECTED]> wrote:
> John R Pierce <[EMAIL PROTECTED]> writes:
>> the whole DST thing falls apart when you deal with places that don't
>> respect it... arizona (except the navajo nation), for instance
>
>> it would be impossible to calculate the 'correct' answe
On 2005-10-26, Tom Lane <[EMAIL PROTECTED]> wrote:
> Klint Gore <[EMAIL PROTECTED]> writes:
>> On Tue, 25 Oct 2005 23:41:54 -0400 (EDT), Bruce Momjian
>> wrote:
>>> test=> select
>>> test-> ('2005-10-30 13:22:00-05'::timestamptz -
>>> test(> '2005-10-29 13:22:00-04'::timestamptz);
>>> ?column?
>>
John R Pierce <[EMAIL PROTECTED]> writes:
> heh. as an aside... the original reason I got ON this and the jdbc
> list was due to an issue we had with an inhouse java+pgsql program when
> it was deployed in Singapore... SGT wasn't recognized, then I
> discovered that China (another later deplo
On Wed, 26 Oct 2005 00:44:50 -0400, Tom Lane <[EMAIL PROTECTED]> wrote:
> John R Pierce <[EMAIL PROTECTED]> writes:
> > the whole DST thing falls apart when you deal with places that don't
> > respect it... arizona (except the navajo nation), for instance
>
> > it would be impossible to calc
Klint Gore <[EMAIL PROTECTED]> writes:
> I think this is what I was getting at. In my timezone 'Australia/NSW',
> we have daylight savings. Is that used any way when the calculation
> happens or the result is displayed?
Absolutely. The examples Bruce and I have been throwing around assume
US Ea
John R Pierce <[EMAIL PROTECTED]> writes:
> the whole DST thing falls apart when you deal with places that don't
> respect it... arizona (except the navajo nation), for instance
> it would be impossible to calculate the 'correct' answer without knowing
> the exact location...
No, rather sa
test=> select
test-> ('2005-10-30 13:22:00-05'::timestamptz -
test(> '2005-10-29 13:22:00-04'::timestamptz);
?column?
--
25:00:00
(1 row)
Is that actually the correct answer?
Disregarding daylight savings, there is 25hrs betwee
Klint Gore <[EMAIL PROTECTED]> writes:
> On Tue, 25 Oct 2005 23:41:54 -0400 (EDT), Bruce Momjian
> wrote:
>> test=> select
>> test-> ('2005-10-30 13:22:00-05'::timestamptz -
>> test(> '2005-10-29 13:22:00-04'::timestamptz);
>> ?column?
>> --
>> 25:00:00
>> (1 row)
> Is that actually the
[sorry about the previous email, I quoted the wrong bit and clicked the
wrong button]
On Tue, 25 Oct 2005 23:41:54 -0400 (EDT), Bruce Momjian
wrote:
> test=> select
> test-> ('2005-10-30 13:22:00-05'::timestamptz -
> test(> '2005-10-29 13:22:00-04'::timestamptz);
>?colu
On Tue, 25 Oct 2005 23:41:54 -0400 (EDT), Bruce Momjian
wrote:
> test-> ('2005-10-30 13:22:00-05'::timestamptz -
> test(> '2005-10-29 13:22:00-04'::timestamptz);
> ?column?
>
>1 day 01:00:00
+---+
Klint Gore wrote:
> On Tue, 25 Oct 2005 13:28:00 -0400, Tom Lane <[EMAIL PROTECTED]> wrote:
> > regression=# select '2005-10-29 13:22:00-04'::timestamptz + '1
> > day'::interval;
> > ?column?
> >
> > 2005-10-30 13:22:00-05
> > (1 row)
> >
> > regression=# select
Nicholas Vinen wrote:
>
> Thanks for all this discussion, fixing, etc. I'm currently having
> "issues" getting postgres' date/time functions to do what I want. You
> have obviously spotted some of the reasons for this.
>
> Many of my issues disappear when I use 8.1, but it's still in beta. Is
On Tue, 25 Oct 2005 13:28:00 -0400, Tom Lane <[EMAIL PROTECTED]> wrote:
> regression=# select '2005-10-29 13:22:00-04'::timestamptz + '1 day'::interval;
> ?column?
>
> 2005-10-30 13:22:00-05
> (1 row)
>
> regression=# select '2005-10-30 13:22:00-05'::timestamptz -
Bruce Momjian writes:
> Tom Lane wrote:
>> Right. Interval multiplication has always spilled fractional months
>> over to seconds, but never the reverse. We have to have that same
>> policy now for fractional days.
> OK, I think that makes sense.
I've applied this change to interval_mul and in
Tom Lane wrote:
> Bruce Momjian writes:
> > OK, what about 1.5 * '1 day'. By my logic multiplication and division
> > were by definition imprecise. Is the logic that we spill down only for
> > non-integral values?
>
> Right. Interval multiplication has always spilled fractional months
> over t
Bruce Momjian writes:
> OK, what about 1.5 * '1 day'. By my logic multiplication and division
> were by definition imprecise. Is the logic that we spill down only for
> non-integral values?
Right. Interval multiplication has always spilled fractional months
over to seconds, but never the rever
Tom Lane wrote:
> Bruce Momjian writes:
> > Tom Lane wrote:
> >> Urgh. I think this is a serious thinko in Michael Glaesemann's rewrite
> >> of interval_mul.
>
> > The reason interval_justify_hours is called by interval multiplication
> > is so multipling an interval '2 days, 4 hours' by 10 does
Bruce Momjian writes:
> Tom Lane wrote:
>> Urgh. I think this is a serious thinko in Michael Glaesemann's rewrite
>> of interval_mul.
> The reason interval_justify_hours is called by interval multiplication
> is so multipling an interval '2 days, 4 hours' by 10 doesn't return
> values like 20 da
Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > Should 24 hours be the same as 1 * 24 hours?
>
> Yes, I would think so.
>
> > The latter appears to be equal to 1 day, not 24 hours:
>
> Urgh. I think this is a serious thinko in Michael Glaesemann's rewrite
> of interval_mul. The
Michael Fuhr <[EMAIL PROTECTED]> writes:
> Should 24 hours be the same as 1 * 24 hours?
Yes, I would think so.
> The latter appears to be equal to 1 day, not 24 hours:
Urgh. I think this is a serious thinko in Michael Glaesemann's rewrite
of interval_mul. The application of interval_justify_ho
On Mon, Oct 24, 2005 at 11:21:52PM -0400, Tom Lane wrote:
> Klint Gore <[EMAIL PROTECTED]> writes:
> > That's changed since v7.4.7
>
> Yup. '1 week' = '7 days' which is no longer the same as 7*24 hours.
> In particular, as of 8.1 local noon plus one day is still local noon,
> even if there was a
On Tue, Oct 25, 2005 at 12:48:10PM +1000, Klint Gore wrote:
> On Tue, 25 Oct 2005 08:51:59 +1000, Russell Smith <[EMAIL PROTECTED]> wrote:
> > Looks to mee like Daylight Savings has conveniently started.
>
> But the elapsed time for those results is only 6 days, 23 hours.
>
> That's changed since
Klint Gore <[EMAIL PROTECTED]> writes:
> That's changed since v7.4.7
Yup. '1 week' = '7 days' which is no longer the same as 7*24 hours.
In particular, as of 8.1 local noon plus one day is still local noon,
even if there was a DST change in between. Adding 24 hours, on the
other hand, might give
On Tue, 25 Oct 2005 08:51:59 +1000, Russell Smith <[EMAIL PROTECTED]> wrote:
> Nicholas wrote:
> > postgres=# SELECT NOW()-interval '1 week';
> >?column?
> > ---
> > 2005-10-17 08:52:37.355219+10
> > (1 row)
> >
> > postgres=# SELECT NOW()-interval '-1 week
Nicholas wrote:
The following bug has been logged online:
Bug reference: 1993
Logged by: Nicholas
Email address: [EMAIL PROTECTED]
PostgreSQL version: 8.0.3,8.0.4,8.1
Operating system: Gentoo Linux
Description:Adding/subtracting negative time intervals changes time
z
The following bug has been logged online:
Bug reference: 1993
Logged by: Nicholas
Email address: [EMAIL PROTECTED]
PostgreSQL version: 8.0.3,8.0.4,8.1
Operating system: Gentoo Linux
Description:Adding/subtracting negative time intervals changes time
zone of result
Det
34 matches
Mail list logo