CVS tip built on Debian unstable, i386, Linux 2.6.5 SMP. gcc 3.3.3 ./configure --with-openssl --with-pam --with-krb5 --with-gnu-ld --with-python --with-perl --with-tcl --with-pgport=5342 --enable-thread-safety --enable-nls --enable-integer-datetimes --enable-debug --enable-cassert --enable-depend
1. There are regression failures on timestamptz and horology which seem to have come about either on input or output of timestamps with fractional seconds. I tried various inputs and found that certain timestamps with fractional seconds had one second added to the time. This appears to be confined to the period from midnight at the start of Dec 14 1901 GMT to midnight at the start of Jan 01 2000 GMT junk=# select cast('Dec 13 15:59:59.50 1901 PST' as timestamptz); timestamptz ------------------------ 1901-12-13 23:59:59.50 (1 row) junk=# select cast('Dec 13 16:00:59.50 1901 PST' as timestamptz); timestamptz --------------------------- 1901-12-14 00:01:00.50+00 (1 row) junk=# select cast('Dec 13 23:59:59.50 1901 GMT' as timestamptz); timestamptz ------------------------ 1901-12-13 23:59:59.50 (1 row) junk=# select cast('Dec 14 00:00:00.50 1901 GMT' as timestamptz); timestamptz --------------------------- 1901-12-14 00:00:01.50+00 (1 row) I tried debugging this but got a segmentation fault and apparent stack corruption in gdb, with the reported break point not anywhere I had set one. I don't know what to do about that. 2. If the postmaster is not running, there is garbage in psql's error message: [EMAIL PROTECTED] export PGPORT=5342 [EMAIL PROTECTED] export PATH=/usr/local/pgsql/bin:$PATH [EMAIL PROTECTED] psql junk psql: could not connect to server: ,[EMAIL PROTECTED] [EMAIL PROTECTED] Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5342"? [EMAIL PROTECTED] psql -h localhost junk psql: could not connect to server: ,[EMAIL PROTECTED] [EMAIL PROTECTED] Is the server running on host "localhost" and accepting TCP/IP connections on port 5342? 3. There is a compilation warning that a constant will not fit into a long in adt.c. There are two more files where INT64CONST() is required but not supplied. Patch attached. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA ======================================== "Do all things without murmurings and disputings; that ye may be blameless and harmless, the sons of God, without rebuke, in the midst of a crooked and perverse nation, among whom ye shine as lights in the world." Philippians 2:14,15
Index: src/backend/utils/adt/date.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/adt/date.c,v retrieving revision 1.97 diff -c -r1.97 date.c *** src/backend/utils/adt/date.c 21 May 2004 05:08:01 -0000 1.97 --- src/backend/utils/adt/date.c 30 May 2004 21:11:56 -0000 *************** *** 1461,1467 **** } else if (result < 0) { ! days = (-result + INT64CONST(86400000000 - 1)) / INT64CONST(86400000000); result += days * INT64CONST(86400000000); } #else --- 1461,1467 ---- } else if (result < 0) { ! days = (-result + INT64CONST(86400000000) - 1) / INT64CONST(86400000000); result += days * INT64CONST(86400000000); } #else Index: src/backend/utils/adt/datetime.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/adt/datetime.c,v retrieving revision 1.128 diff -c -r1.128 datetime.c *** src/backend/utils/adt/datetime.c 21 May 2004 05:08:01 -0000 1.128 --- src/backend/utils/adt/datetime.c 30 May 2004 21:11:56 -0000 *************** *** 1209,1215 **** tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP ! dt2time((time * 86400000000), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), --- 1209,1215 ---- tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP ! dt2time((time * INT64CONST(86400000000)), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), *************** *** 1960,1966 **** tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP ! dt2time((time * 86400000000), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), --- 1960,1966 ---- tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP ! dt2time((time * INT64CONST(86400000000)), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), Index: src/interfaces/ecpg/pgtypeslib/dt_common.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/pgtypeslib/dt_common.c,v retrieving revision 1.15 diff -c -r1.15 dt_common.c *** src/interfaces/ecpg/pgtypeslib/dt_common.c 7 May 2004 00:24:58 -0000 1.15 --- src/interfaces/ecpg/pgtypeslib/dt_common.c 30 May 2004 21:11:58 -0000 *************** *** 2255,2261 **** tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP ! dt2time((time * 86400000000), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #endif --- 2255,2261 ---- tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP ! dt2time((time * INT64CONST(86400000000)), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #endif
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html