Re: [HACKERS] failed datetime regression tests

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Jon Buller <jonb(at)metronet(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] failed datetime regression tests
Date: 1998-09-03 04:39:19
Message-ID: 35EE1D77.C174E730@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-09-03 04:59:33 Re: [HACKERS] index fix report
Previous Message Bruce Momjian 1998-09-03 04:21:50 index fix report