Re: [HACKERS] failed datetime regression tests - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] failed datetime regression tests
Date
Msg-id 35EE1D77.C174E730@alumni.caltech.edu
Whole thread Raw
In response to failed datetime regression tests  (Jon Buller <jonb@metronet.com>)
List pgsql-hackers
> I'll send a set
> of diffs in when I think it works.

Great. Always happy to add one more notch to our pistol :)

> and the expected output was something like "bad format"...  However, I
> got the following lines out of the test with diff -c:
> --- results/datetime.out        Mon Aug 31 18:38:04 1998
>   QUERY: SELECT ('now'::datetime - 'current'::datetime) AS "ZeroSecs";
> ! ZeroSecs
> ! ---------------------------------------
> ! @ 486 days 22 hours 22 mins 13 secs ago
>   (1 row)

This seems consistant with 'current' coming up zero, since datetime is
stored as a double float in seconds from 2000-01-01. Don't know why that
would be, but you might want to enable debugging print statements in
backend/utils/adt/dt.c by doing the following:
1) edit the Makefile in that directory to add
  CFLAGS += -DDATEDEBUG

2) do a "make clean" in that directory, then rebuild your executables.

3) run postmaster from a window, so you can see the results of print
statements.

4) connect a psql session from another window, and try some sample
queries like your failed ones above. The print statements might give you
some clues if you follow them through the code in a third window :)

Let me know if you get any evidence...

                   - Tom

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: index fix report
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] index fix report