Re: boolean operator on interval producing strange results - Mailing list pgsql-general

From Merlin Moncure
Subject Re: boolean operator on interval producing strange results
Date
Msg-id b42b73150702200630w68416492ndd3d01dff67bdff2@mail.gmail.com
Whole thread Raw
In response to Re: boolean operator on interval producing strange results  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: boolean operator on interval producing strange results  ("Adam Rich" <adam.r@sbcglobal.net>)
Re: boolean operator on interval producing strange results  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 2/19/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Merlin Moncure" <mmoncure@gmail.com> writes:
> > #  select ((now() - '1 day'::interval)::timestamp - now()) < 0;
> >  ?column?
> > ----------
> >  f  <-- looks busted to me
> > (1 row)
>
> If you'd casted to timestamptz then I'd agree this is busted.
> As-is, it might have something to do with your timezone setting,
> which you didn't mention?

show timezone reports us/eastern in both cases.  also, i don't really
see how this matters, since we are comparing '-1 days'::interval with
0 in both cases. in fact:

# show timezone;
  TimeZone
------------
 US/Eastern
(1 row)

#  select ('-1 days'::interval)  < 0;
 ?column?
----------
 f
(1 row)

as it happens, after months and months of faithful service, this
machine decided to dump core last night.  so, we are scheduling some
downtime + yum update. (my previous mail was wrong, production was the
non-updated box).  this is the only environmental difference I can
think of.  At the very least I can report back if this fixes the
problem.

merlin

pgsql-general by date:

Previous
From: Tomasz Ostrowski
Date:
Subject: Re: Advisory on possibly insecure security definer functions
Next
From: "Adam Rich"
Date:
Subject: Re: boolean operator on interval producing strange results