Re: Regression test 'abstime' fails. - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: Regression test 'abstime' fails.
Date
Msg-id 200107031642.f63GgYM24084@candle.pha.pa.us
Whole thread Raw
In response to Regression test 'abstime' fails.  (Reinhard Max <max@suse.de>)
List pgsql-bugs
Tom Lane has fixed this in the current sources.

> Hi,
>
> this test fails newly, because it has "Jun 30, 2001" hard-coded and
> assumes this date to be in the future which obviously became false
> last Weekend. It took me a lot of time to track it down, because I
> suspected everything but the test itself to be the reason ("It can't
> be wrong, because last Friday it worked just fine") and therefore
> didn't have a thorough look at the sql file first.
>
> Is it possible to generate this date dynamically so that it is
> guaranteed to always be in the future? If not, I suggest to set it to
> something near infinity.
>
> Furthermore, I suggest to generate regression.diffs with some more
> lines of context. I would have helped a lot in this case, if the query
> had shown up in the diff's context.
>
>
> cu
>     Reinhard
>
>
> --- expected/abstime.out        Thu May  3 19:00:37 2001
> +++ results/abstime.out Tue Jul  3 09:53:47 2001
> @@ -43,18 +43,17 @@
>  SELECT '' AS six, ABSTIME_TBL.*
>     WHERE ABSTIME_TBL.f1 < abstime 'Jun 30, 2001';
>   six |              f1
>  -----+------------------------------
>       | Sun Jan 14 03:14:21 1973 PST
>       | Mon May 01 00:30:30 1995 PDT
>       | epoch
> -     | current
>       | -infinity
>       | Sat May 10 23:59:12 1947 PST
> -(6 rows)
> +(5 rows)
>
>  SELECT '' AS six, ABSTIME_TBL.*
>     WHERE ABSTIME_TBL.f1 > abstime '-infinity';
>   six |              f1
>  -----+------------------------------
>       | Sun Jan 14 03:14:21 1973 PST
>       | Mon May 01 00:30:30 1995 PDT
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-bugs by date:

Previous
From: Reinhard Max
Date:
Subject: Regression test 'abstime' fails.
Next
From: "Tony Greenwood"
Date:
Subject: Mandrake 8.0 Portig Problems