Re: datetime regress test busted by incomplete checkin

Started by Bruce Momjianalmost 27 years ago11 messages
#1Bruce Momjian
maillist@candle.pha.pa.us

Someone (you, according to the cvs logs) checked in an update to the
"expected" file for the datetime regress test, but didn't check in the
corresponding update to the test file itself. sql/datetime.sql is
still dated 1997 ...

It came from someone, not sure who. Can someone comment? If not, let's
back it out.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@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
#2Oleg Broytmann
phd@sun.med.ru
In reply to: Bruce Momjian (#1)
1 attachment(s)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Hello!

On Sat, 23 Jan 1999, Bruce Momjian wrote:

Someone (you, according to the cvs logs) checked in an update to the
"expected" file for the datetime regress test, but didn't check in the
corresponding update to the test file itself. sql/datetime.sql is
still dated 1997 ...

It came from someone, not sure who. Can someone comment? If not, let's
back it out.

-- 
Bruce Momjian                        |  http://www.op.net/~candle
maillist@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

Probably that's me. The patch attached. Is there any problem?

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.

Attachments:

datetime-regression-patchtext/plain; charset=US-ASCII; name=datetime-regression-patchDownload
*** ./src/test/regress/expected/datetime.out.orig	Mon Jan  5 06:35:27 1998
--- ./src/test/regress/expected/datetime.out	Wed Jan  6 12:50:50 1999
***************
*** 28,33 ****
--- 28,40 ----
  @ 0     
  (1 row)
  
+ QUERY: SET DateStyle = 'Postgres,noneuropean';
+ QUERY: SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+ ----------------------------
+ Sat Jan 01 11:00:00 1994 PST
+ (1 row)
+ 
  QUERY: CREATE TABLE DATETIME_TBL( d1 datetime);
  QUERY: INSERT INTO DATETIME_TBL VALUES ('current');
  QUERY: INSERT INTO DATETIME_TBL VALUES ('today');
*** ./src/test/regress/sql/datetime.sql.orig	Sat Nov 15 05:55:57 1997
--- ./src/test/regress/sql/datetime.sql	Wed Jan  6 12:49:23 1999
***************
*** 10,15 ****
--- 10,18 ----
  SELECT ('current'::datetime = 'now'::datetime) as "True";
  SELECT ('now'::datetime - 'current'::datetime) AS "ZeroSecs";
  
+ SET DateStyle = 'Postgres,noneuropean';
+ SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ 
  CREATE TABLE DATETIME_TBL( d1 datetime);
  
  INSERT INTO DATETIME_TBL VALUES ('current');
#3Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Oleg Broytmann (#2)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Hello!

On Sat, 23 Jan 1999, Bruce Momjian wrote:

Someone (you, according to the cvs logs) checked in an update to the
"expected" file for the datetime regress test, but didn't check in the
corresponding update to the test file itself. sql/datetime.sql is
still dated 1997 ...

It came from someone, not sure who. Can someone comment? If not, let's
back it out.

-- 
Bruce Momjian                        |  http://www.op.net/~candle
maillist@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

Probably that's me. The patch attached. Is there any problem?

You need to patch datetime.sql too. That is required to generate the
proper expected file, which is compared to the out file. Can you supply
the patch?

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.

Content-Description:

*** ./src/test/regress/expected/datetime.out.orig	Mon Jan  5 06:35:27 1998
--- ./src/test/regress/expected/datetime.out	Wed Jan  6 12:50:50 1999
***************
*** 28,33 ****
--- 28,40 ----
@ 0     
(1 row)
+ QUERY: SET DateStyle = 'Postgres,noneuropean';
+ QUERY: SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+ ----------------------------
+ Sat Jan 01 11:00:00 1994 PST
+ (1 row)
+ 
QUERY: CREATE TABLE DATETIME_TBL( d1 datetime);
QUERY: INSERT INTO DATETIME_TBL VALUES ('current');
QUERY: INSERT INTO DATETIME_TBL VALUES ('today');
*** ./src/test/regress/sql/datetime.sql.orig	Sat Nov 15 05:55:57 1997
--- ./src/test/regress/sql/datetime.sql	Wed Jan  6 12:49:23 1999
***************
*** 10,15 ****
--- 10,18 ----
SELECT ('current'::datetime = 'now'::datetime) as "True";
SELECT ('now'::datetime - 'current'::datetime) AS "ZeroSecs";
+ SET DateStyle = 'Postgres,noneuropean';
+ SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ 
CREATE TABLE DATETIME_TBL( d1 datetime);

INSERT INTO DATETIME_TBL VALUES ('current');

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@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
#4Oleg Broytmann
phd@sun.med.ru
In reply to: Bruce Momjian (#3)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Hi!

On Mon, 25 Jan 1999, Bruce Momjian wrote:

You need to patch datetime.sql too. That is required to generate the
proper expected file, which is compared to the out file. Can you supply
the patch?

But it is here - 20 lines below from the beginning of the patch. The
patch was generated by make_diff tools. Isn't it enough?

*** ./src/test/regress/expected/datetime.out.orig	Mon Jan  5 06:35:27 1998
--- ./src/test/regress/expected/datetime.out	Wed Jan  6 12:50:50 1999
***************
*** 28,33 ****
--- 28,40 ----
@ 0     
(1 row)
+ QUERY: SET DateStyle = 'Postgres,noneuropean';
+ QUERY: SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+ ----------------------------
+ Sat Jan 01 11:00:00 1994 PST
+ (1 row)
+ 
QUERY: CREATE TABLE DATETIME_TBL( d1 datetime);
QUERY: INSERT INTO DATETIME_TBL VALUES ('current');
QUERY: INSERT INTO DATETIME_TBL VALUES ('today');
*** ./src/test/regress/sql/datetime.sql.orig	Sat Nov 15 05:55:57 1997
--- ./src/test/regress/sql/datetime.sql	Wed Jan  6 12:49:23 1999
***************
*** 10,15 ****
--- 10,18 ----
SELECT ('current'::datetime = 'now'::datetime) as "True";
SELECT ('now'::datetime - 'current'::datetime) AS "ZeroSecs";
+ SET DateStyle = 'Postgres,noneuropean';
+ SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ 
CREATE TABLE DATETIME_TBL( d1 datetime);

INSERT INTO DATETIME_TBL VALUES ('current');

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.

#5Thomas G. Lockhart
lockhart@alumni.caltech.edu
In reply to: Oleg Broytmann (#2)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Probably that's me. The patch attached. Is there any problem?

Could you phrase the query in the same style as most of the other tests
(a style we inherited from the original sources), where the first column
is a select of an empty string with the table count as the label? I
would suggest something like:

SELECT '' AS one,
datetime('1994-01-01', '11:00') AS "Sat Jan 01 11:00:00 1994 PST";

I think we can use the actual current result in the result label (and
without underscores), since you are surrounding it with double quotes
anyway.

TIA

- Tom

Show quoted text
+ QUERY: SET DateStyle = 'Postgres,noneuropean';
+ QUERY: SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+ ----------------------------
+ Sat Jan 01 11:00:00 1994 PST
+ (1 row)
#6Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Oleg Broytmann (#4)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Hi!

On Mon, 25 Jan 1999, Bruce Momjian wrote:

You need to patch datetime.sql too. That is required to generate the
proper expected file, which is compared to the out file. Can you supply
the patch?

But it is here - 20 lines below from the beginning of the patch. The
patch was generated by make_diff tools. Isn't it enough?

Got it. I am a dope. I will apply it as soon as I apply my current
aggregate work.

*** ./src/test/regress/expected/datetime.out.orig	Mon Jan  5 06:35:27 1998
--- ./src/test/regress/expected/datetime.out	Wed Jan  6 12:50:50 1999
***************
*** 28,33 ****
--- 28,40 ----
@ 0     
(1 row)
+ QUERY: SET DateStyle = 'Postgres,noneuropean';
+ QUERY: SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+ ----------------------------
+ Sat Jan 01 11:00:00 1994 PST
+ (1 row)
+ 
QUERY: CREATE TABLE DATETIME_TBL( d1 datetime);
QUERY: INSERT INTO DATETIME_TBL VALUES ('current');
QUERY: INSERT INTO DATETIME_TBL VALUES ('today');
*** ./src/test/regress/sql/datetime.sql.orig	Sat Nov 15 05:55:57 1997
--- ./src/test/regress/sql/datetime.sql	Wed Jan  6 12:49:23 1999
***************
*** 10,15 ****
--- 10,18 ----
SELECT ('current'::datetime = 'now'::datetime) as "True";
SELECT ('now'::datetime - 'current'::datetime) AS "ZeroSecs";
+ SET DateStyle = 'Postgres,noneuropean';
+ SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ 
CREATE TABLE DATETIME_TBL( d1 datetime);

INSERT INTO DATETIME_TBL VALUES ('current');

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@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
#7Oleg Broytmann
phd@sun.med.ru
In reply to: Thomas G. Lockhart (#5)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Hi!

On Mon, 25 Jan 1999, Thomas G. Lockhart wrote:

Could you phrase the query in the same style as most of the other tests
(a style we inherited from the original sources), where the first column
is a select of an empty string with the table count as the label? I
would suggest something like:

SELECT '' AS one,
datetime('1994-01-01', '11:00') AS "Sat Jan 01 11:00:00 1994 PST";

I got my style from the lines above my test. There are things like:

SELECT ('now'::datetime - 'current'::datetime) AS "ZeroSecs";

"Sat Jan 01 11:00:00 1994 PST" looks bad as a result, I think.

Of course, I can recreate the patch, but should I?

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.

#8Oleg Broytmann
phd@sun.med.ru
In reply to: Bruce Momjian (#6)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Hi!

On Mon, 25 Jan 1999, Bruce Momjian wrote:

Got it. I am a dope. I will apply it as soon as I apply my current
aggregate work.

May be you need some rest, some sleep? For me, sleep is usually of big
help! :)

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.

#9Thomas G. Lockhart
lockhart@alumni.caltech.edu
In reply to: Oleg Broytmann (#7)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Could you phrase the query in the same style as most of the other
tests (a style we inherited from the original sources),

I got my style from the lines above my test.
Of course, I can recreate the patch, but should I?

Naw. You're right...

- Tom

#10Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Oleg Broytmann (#2)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Applied. Sorry.

Hello!

On Sat, 23 Jan 1999, Bruce Momjian wrote:

Someone (you, according to the cvs logs) checked in an update to the
"expected" file for the datetime regress test, but didn't check in the
corresponding update to the test file itself. sql/datetime.sql is
still dated 1997 ...

It came from someone, not sure who. Can someone comment? If not, let's
back it out.

-- 
Bruce Momjian                        |  http://www.op.net/~candle
maillist@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

Probably that's me. The patch attached. Is there any problem?

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.

Content-Description:

*** ./src/test/regress/expected/datetime.out.orig	Mon Jan  5 06:35:27 1998
--- ./src/test/regress/expected/datetime.out	Wed Jan  6 12:50:50 1999
***************
*** 28,33 ****
--- 28,40 ----
@ 0     
(1 row)
+ QUERY: SET DateStyle = 'Postgres,noneuropean';
+ QUERY: SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+ ----------------------------
+ Sat Jan 01 11:00:00 1994 PST
+ (1 row)
+ 
QUERY: CREATE TABLE DATETIME_TBL( d1 datetime);
QUERY: INSERT INTO DATETIME_TBL VALUES ('current');
QUERY: INSERT INTO DATETIME_TBL VALUES ('today');
*** ./src/test/regress/sql/datetime.sql.orig	Sat Nov 15 05:55:57 1997
--- ./src/test/regress/sql/datetime.sql	Wed Jan  6 12:49:23 1999
***************
*** 10,15 ****
--- 10,18 ----
SELECT ('current'::datetime = 'now'::datetime) as "True";
SELECT ('now'::datetime - 'current'::datetime) AS "ZeroSecs";
+ SET DateStyle = 'Postgres,noneuropean';
+ SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
+ 
CREATE TABLE DATETIME_TBL( d1 datetime);

INSERT INTO DATETIME_TBL VALUES ('current');

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@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
#11Oleg Broytmann
phd@sun.med.ru
In reply to: Bruce Momjian (#10)
Re: [HACKERS] Re: datetime regress test busted by incomplete checkin

Hello!

Please, everyone, run the regression test and watch datetime test. I
have tested it on my computers (there is Pentium with Debian 2.0 and
Ultra-1 with Solaris 2.5.1) - the test passed well. I want to know how it
is going on other systems.

Oleg.
----
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.