regression test failure

Started by Neil Conwayover 22 years ago5 messages
#1Neil Conway
neilc@samurai.com
1 attachment(s)

When I run the regression tests against current sources, I get
failures because bison-generated error messages use "parse
error", not "syntax error". I vaguely recall running into
this issue before I left for the summer -- did we resolve
it?

[neil@arch neil]$ uname -a
FreeBSD arch.wavefire.com 5.1-CURRENT FreeBSD 5.1-CURRENT #9: Fri Jul 25 12:10:58 PDT 2003 root@arch.wavefire.com:/usr/obj/usr/src/sys/WORKSTATION-5.0-SMP i386
[neil@arch neil]$ bison --version
bison (GNU Bison) 1.875
[neil@arch neil]$ flex --version
flex version 2.5.4

regression.diffs is attached.

-Neil

P.S. Someone should go ahead and re-generate INSTALL from
the latest SGML: INSTALL still claims that we need bison
1.50 or greater.

Attachments:

regression.diffstext/plain; charset=us-asciiDownload
*** ./expected/strings.out	Sat Jul 26 21:53:11 2003
--- ./results/strings.out	Thu Aug  7 10:58:29 2003
***************
*** 18,24 ****
  ' - next line' /* this comment is not allowed here */
  ' - third line'
  	AS "Illegal comment within continuation";
! ERROR:  syntax error at or near "' - third line'" at character 75
  --
  -- test conversions between various string types
  -- E021-10 implicit casting among the character data types
--- 18,24 ----
  ' - next line' /* this comment is not allowed here */
  ' - third line'
  	AS "Illegal comment within continuation";
! ERROR:  parse error at or near "' - third line'" at character 75
  --
  -- test conversions between various string types
  -- E021-10 implicit casting among the character data types

======================================================================

*** ./expected/create_function_1.out	Thu Aug  7 10:39:56 2003
--- ./results/create_function_1.out	Thu Aug  7 10:58:38 2003
***************
*** 54,60 ****
  DETAIL:  Actual return type is "unknown".
  CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
      AS 'not even SQL';
! ERROR:  syntax error at or near "not" at character 1
  CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
      AS 'SELECT 1, 2, 3;';
  ERROR:  return type mismatch in function declared to return integer
--- 54,60 ----
  DETAIL:  Actual return type is "unknown".
  CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
      AS 'not even SQL';
! ERROR:  parse error at or near "not" at character 1
  CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
      AS 'SELECT 1, 2, 3;';
  ERROR:  return type mismatch in function declared to return integer

======================================================================

*** ./expected/constraints.out	Thu Aug  7 10:39:56 2003
--- ./results/constraints.out	Thu Aug  7 10:58:50 2003
***************
*** 45,56 ****
  -- syntax errors
  --  test for extraneous comma
  CREATE TABLE error_tbl (i int DEFAULT (100, ));
! ERROR:  syntax error at or near "," at character 43
  --  this will fail because gram.y uses b_expr not a_expr for defaults,
  --  to avoid a shift/reduce conflict that arises from NOT NULL being
  --  part of the column definition syntax:
  CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2));
! ERROR:  syntax error at or near "IN" at character 43
  --  this should work, however:
  CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2)));
  DROP TABLE error_tbl;
--- 45,56 ----
  -- syntax errors
  --  test for extraneous comma
  CREATE TABLE error_tbl (i int DEFAULT (100, ));
! ERROR:  parse error at or near "," at character 43
  --  this will fail because gram.y uses b_expr not a_expr for defaults,
  --  to avoid a shift/reduce conflict that arises from NOT NULL being
  --  part of the column definition syntax:
  CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2));
! ERROR:  parse error at or near "IN" at character 43
  --  this should work, however:
  CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2)));
  DROP TABLE error_tbl;

======================================================================

*** ./expected/errors.out	Mon Jul 21 13:29:40 2003
--- ./results/errors.out	Thu Aug  7 10:59:14 2003
***************
*** 22,34 ****
   
  -- missing relation name 
  select;
! ERROR:  syntax error at or near ";" at character 7
  -- no such relation 
  select * from nonesuch;
  ERROR:  relation "nonesuch" does not exist
  -- missing target list
  select from pg_database;
! ERROR:  syntax error at or near "from" at character 8
  -- bad name in target list
  select nonesuch from pg_database;
  ERROR:  attribute "nonesuch" not found
--- 22,34 ----
   
  -- missing relation name 
  select;
! ERROR:  parse error at or near ";" at character 7
  -- no such relation 
  select * from nonesuch;
  ERROR:  relation "nonesuch" does not exist
  -- missing target list
  select from pg_database;
! ERROR:  parse error at or near "from" at character 8
  -- bad name in target list
  select nonesuch from pg_database;
  ERROR:  attribute "nonesuch" not found
***************
*** 40,46 ****
  ERROR:  attribute "nonesuch" not found
  -- bad select distinct on syntax, distinct attribute missing
  select distinct on (foobar) from pg_database;
! ERROR:  syntax error at or near "from" at character 29
  -- bad select distinct on syntax, distinct attribute not in target list
  select distinct on (foobar) * from pg_database;
  ERROR:  attribute "foobar" not found
--- 40,46 ----
  ERROR:  attribute "nonesuch" not found
  -- bad select distinct on syntax, distinct attribute missing
  select distinct on (foobar) from pg_database;
! ERROR:  parse error at or near "from" at character 29
  -- bad select distinct on syntax, distinct attribute not in target list
  select distinct on (foobar) * from pg_database;
  ERROR:  attribute "foobar" not found
***************
*** 49,55 ****
   
  -- missing relation name (this had better not wildcard!) 
  delete from;
! ERROR:  syntax error at or near ";" at character 12
  -- no such relation 
  delete from nonesuch;
  ERROR:  relation "nonesuch" does not exist
--- 49,55 ----
   
  -- missing relation name (this had better not wildcard!) 
  delete from;
! ERROR:  parse error at or near ";" at character 12
  -- no such relation 
  delete from nonesuch;
  ERROR:  relation "nonesuch" does not exist
***************
*** 58,64 ****
   
  -- missing relation name (this had better not wildcard!) 
  drop table;
! ERROR:  syntax error at or near ";" at character 11
  -- no such relation 
  drop table nonesuch;
  ERROR:  table "nonesuch" does not exist
--- 58,64 ----
   
  -- missing relation name (this had better not wildcard!) 
  drop table;
! ERROR:  parse error at or near ";" at character 11
  -- no such relation 
  drop table nonesuch;
  ERROR:  table "nonesuch" does not exist
***************
*** 68,74 ****
  -- relation renaming 
  -- missing relation name 
  alter table rename;
! ERROR:  syntax error at or near ";" at character 19
  -- no such relation 
  alter table nonesuch rename to newnonesuch;
  ERROR:  relation "nonesuch" does not exist
--- 68,74 ----
  -- relation renaming 
  -- missing relation name 
  alter table rename;
! ERROR:  parse error at or near ";" at character 19
  -- no such relation 
  alter table nonesuch rename to newnonesuch;
  ERROR:  relation "nonesuch" does not exist
***************
*** 122,131 ****
   
  -- missing index name 
  drop index;
! ERROR:  syntax error at or near ";" at character 11
  -- bad index name 
  drop index 314159;
! ERROR:  syntax error at or near "314159" at character 12
  -- no such index 
  drop index nonesuch;
  ERROR:  index "nonesuch" does not exist
--- 122,131 ----
   
  -- missing index name 
  drop index;
! ERROR:  parse error at or near ";" at character 11
  -- bad index name 
  drop index 314159;
! ERROR:  parse error at or near "314159" at character 12
  -- no such index 
  drop index nonesuch;
  ERROR:  index "nonesuch" does not exist
***************
*** 134,146 ****
   
  -- missing aggregate name 
  drop aggregate;
! ERROR:  syntax error at or near ";" at character 15
  -- missing aggregate type
  drop aggregate newcnt1;
! ERROR:  syntax error at or near ";" at character 23
  -- bad aggregate name 
  drop aggregate 314159 (int);
! ERROR:  syntax error at or near "314159" at character 16
  -- bad aggregate type
  drop aggregate newcnt (nonesuch);
  ERROR:  type "nonesuch" does not exist
--- 134,146 ----
   
  -- missing aggregate name 
  drop aggregate;
! ERROR:  parse error at or near ";" at character 15
  -- missing aggregate type
  drop aggregate newcnt1;
! ERROR:  parse error at or near ";" at character 23
  -- bad aggregate name 
  drop aggregate 314159 (int);
! ERROR:  parse error at or near "314159" at character 16
  -- bad aggregate type
  drop aggregate newcnt (nonesuch);
  ERROR:  type "nonesuch" does not exist
***************
*** 155,164 ****
   
  -- missing function name 
  drop function ();
! ERROR:  syntax error at or near "(" at character 15
  -- bad function name 
  drop function 314159();
! ERROR:  syntax error at or near "314159" at character 15
  -- no such function 
  drop function nonesuch();
  ERROR:  function nonesuch() does not exist
--- 155,164 ----
   
  -- missing function name 
  drop function ();
! ERROR:  parse error at or near "(" at character 15
  -- bad function name 
  drop function 314159();
! ERROR:  parse error at or near "314159" at character 15
  -- no such function 
  drop function nonesuch();
  ERROR:  function nonesuch() does not exist
***************
*** 167,176 ****
   
  -- missing type name 
  drop type;
! ERROR:  syntax error at or near ";" at character 10
  -- bad type name 
  drop type 314159;
! ERROR:  syntax error at or near "314159" at character 11
  -- no such type 
  drop type nonesuch;
  ERROR:  type "nonesuch" does not exist
--- 167,176 ----
   
  -- missing type name 
  drop type;
! ERROR:  parse error at or near ";" at character 10
  -- bad type name 
  drop type 314159;
! ERROR:  parse error at or near "314159" at character 11
  -- no such type 
  drop type nonesuch;
  ERROR:  type "nonesuch" does not exist
***************
*** 179,200 ****
   
  -- missing everything 
  drop operator;
! ERROR:  syntax error at or near ";" at character 14
  -- bad operator name 
  drop operator equals;
! ERROR:  syntax error at or near ";" at character 21
  -- missing type list 
  drop operator ===;
! ERROR:  syntax error at or near ";" at character 18
  -- missing parentheses 
  drop operator int4, int4;
! ERROR:  syntax error at or near "," at character 19
  -- missing operator name 
  drop operator (int4, int4);
! ERROR:  syntax error at or near "(" at character 15
  -- missing type list contents 
  drop operator === ();
! ERROR:  syntax error at or near ")" at character 20
  -- no such operator 
  drop operator === (int4);
  ERROR:  argument type missing (use NONE for unary operators)
--- 179,200 ----
   
  -- missing everything 
  drop operator;
! ERROR:  parse error at or near ";" at character 14
  -- bad operator name 
  drop operator equals;
! ERROR:  parse error at or near ";" at character 21
  -- missing type list 
  drop operator ===;
! ERROR:  parse error at or near ";" at character 18
  -- missing parentheses 
  drop operator int4, int4;
! ERROR:  parse error at or near "," at character 19
  -- missing operator name 
  drop operator (int4, int4);
! ERROR:  parse error at or near "(" at character 15
  -- missing type list contents 
  drop operator === ();
! ERROR:  parse error at or near ")" at character 20
  -- no such operator 
  drop operator === (int4);
  ERROR:  argument type missing (use NONE for unary operators)
***************
*** 206,212 ****
  ERROR:  argument type missing (use NONE for unary operators)
  -- no such type1 
  drop operator = ( , int4);
! ERROR:  syntax error at or near "," at character 19
  -- no such type1 
  drop operator = (nonesuch, int4);
  ERROR:  type nonesuch does not exist
--- 206,212 ----
  ERROR:  argument type missing (use NONE for unary operators)
  -- no such type1 
  drop operator = ( , int4);
! ERROR:  parse error at or near "," at character 19
  -- no such type1 
  drop operator = (nonesuch, int4);
  ERROR:  type nonesuch does not exist
***************
*** 215,242 ****
  ERROR:  type nonesuch does not exist
  -- no such type2 
  drop operator = (int4, );
! ERROR:  syntax error at or near ")" at character 24
  --
  -- DROP RULE
   
  -- missing rule name 
  drop rule;
! ERROR:  syntax error at or near ";" at character 10
  -- bad rule name 
  drop rule 314159;
! ERROR:  syntax error at or near "314159" at character 11
  -- no such rule 
  drop rule nonesuch on noplace;
  ERROR:  relation "noplace" does not exist
  -- bad keyword 
  drop tuple rule nonesuch;
! ERROR:  syntax error at or near "tuple" at character 6
  -- no such rule 
  drop instance rule nonesuch on noplace;
! ERROR:  syntax error at or near "instance" at character 6
  -- no such rule 
  drop rewrite rule nonesuch;
! ERROR:  syntax error at or near "rewrite" at character 6
  --
  -- Check that division-by-zero is properly caught.
  --
--- 215,242 ----
  ERROR:  type nonesuch does not exist
  -- no such type2 
  drop operator = (int4, );
! ERROR:  parse error at or near ")" at character 24
  --
  -- DROP RULE
   
  -- missing rule name 
  drop rule;
! ERROR:  parse error at or near ";" at character 10
  -- bad rule name 
  drop rule 314159;
! ERROR:  parse error at or near "314159" at character 11
  -- no such rule 
  drop rule nonesuch on noplace;
  ERROR:  relation "noplace" does not exist
  -- bad keyword 
  drop tuple rule nonesuch;
! ERROR:  parse error at or near "tuple" at character 6
  -- no such rule 
  drop instance rule nonesuch on noplace;
! ERROR:  parse error at or near "instance" at character 6
  -- no such rule 
  drop rewrite rule nonesuch;
! ERROR:  parse error at or near "rewrite" at character 6
  --
  -- Check that division-by-zero is properly caught.
  --

======================================================================

#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Neil Conway (#1)
Re: regression test failure

Strange. I know we check for bison >= 1.875, and you have that, and so
do I, but I don't see those regression failures. Is it possible you
have old bison output files from an older bison release?

---------------------------------------------------------------------------

Neil Conway wrote:

When I run the regression tests against current sources, I get
failures because bison-generated error messages use "parse
error", not "syntax error". I vaguely recall running into
this issue before I left for the summer -- did we resolve
it?

[neil@arch neil]$ uname -a
FreeBSD arch.wavefire.com 5.1-CURRENT FreeBSD 5.1-CURRENT #9: Fri Jul 25 12:10:58 PDT 2003 root@arch.wavefire.com:/usr/obj/usr/src/sys/WORKSTATION-5.0-SMP i386
[neil@arch neil]$ bison --version
bison (GNU Bison) 1.875
[neil@arch neil]$ flex --version
flex version 2.5.4

regression.diffs is attached.

-Neil

P.S. Someone should go ahead and re-generate INSTALL from
the latest SGML: INSTALL still claims that we need bison
1.50 or greater.

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: regression test failure

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Strange. I know we check for bison >= 1.875, and you have that, and so
do I, but I don't see those regression failures. Is it possible you
have old bison output files from an older bison release?

I think the check is only a warning though; and the only thing that
actually fails to build is ecpg's preproc.y. It's possible his current
copy of parser/gram.c was built with an older bison before he hit the
hard failure, and then he didn't go back and rebuild after updating
bison.

I'd suggest a "make maintainer-clean" and try again.

regards, tom lane

#4Neil Conway
neilc@samurai.com
In reply to: Tom Lane (#3)
Re: regression test failure

On Thu, Aug 07, 2003 at 04:09:33PM -0400, Tom Lane wrote:
I think the check is only a warning though; and the only thing that

actually fails to build is ecpg's preproc.y. It's possible his current
copy of parser/gram.c was built with an older bison before he hit the
hard failure, and then he didn't go back and rebuild after updating
bison.

Uh, yeah -- of course, that's exactly what the problem was. I had
assumed, wrongly of course, that "make distclean" removed bison
output.

I feel stupid :-)

-Neil

#5Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Neil Conway (#4)
Re: regression test failure

I didn't know about "make maintainer-clean" either.

---------------------------------------------------------------------------

Neil Conway wrote:

On Thu, Aug 07, 2003 at 04:09:33PM -0400, Tom Lane wrote:
I think the check is only a warning though; and the only thing that

actually fails to build is ecpg's preproc.y. It's possible his current
copy of parser/gram.c was built with an older bison before he hit the
hard failure, and then he didn't go back and rebuild after updating
bison.

Uh, yeah -- of course, that's exactly what the problem was. I had
assumed, wrongly of course, that "make distclean" removed bison
output.

I feel stupid :-)

-Neil

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073