Re: [HACKERS] [PATCHES] Proposed patch for contrib/cube
I have completed upgrading the cube codebase to use the V1 call protocol. However, before I submit a patch I would really like to work out why I have never been able to get cube to pass installcheck. This is what I get when I run installcheck on a clean version of 8.1.4 (I get similar results on CVS HEAD). The regression.diff is attached. josh:~/installs/postgresql-8.1.4/contrib/cube josh$ make installcheck make -C ../../src/test/regress pg_regress make[1]: `pg_regress' is up to date. /bin/sh ../../src/test/regress/pg_regress --dbname=contrib_regression cube (using postmaster on Unix socket, default port) == dropping database contrib_regression == DROP DATABASE == creating database contrib_regression == CREATE DATABASE == dropping regression test user accounts == == running regression test queries== test cube ... FAILED == 1 of 1 tests failed. == I have tried this both on OS X and Linux and get similar results. Josh Reich Neil Conway wrote: On Mon, 2006-07-17 at 17:55 -0400, Joshua Reich wrote: Ok. So, the cube code looks very unmaintained (not to offend anyone), but it is all in V0 and I believe make installcheck fails out of the box due to new error message formats. It passes for me with CVS HEAD. The cube regression test is also run as part of the buildfarm process, so it sounds like an error on your end. *** ./expected/cube_1.out Sun Jun 26 21:19:43 2005 --- ./results/cube.out Tue Jul 18 09:44:14 2006 *** *** 258,310 -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '[(1)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[(1),]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[(1),2]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near 2 SELECT '[(1),(2),(3)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '1,'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT '1,2,'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT '1,,2'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '(1,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '(1,2,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '(1,,2)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , -- invalid input: semantic errors and trailing garbage SELECT '[(1),(2)],'::cube AS cube; -- 0 ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1 ERROR: bad cube representation DETAIL: different point dimensions in (1,2,3) and (2,3) --- 258,310 -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '[(1)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[(1),]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[(1),2]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near 2 SELECT '[(1),(2),(3)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near , SELECT '1,'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT '1,2,'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT '1,,2'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near , SELECT '(1,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '(1,2,)'::cube AS cube; ERROR: bad cube representation ! DETAIL:
Re: [HACKERS] [PATCHES] Proposed patch for contrib/cube
What version of bison do you have? cheers andrew Joshua Reich wrote: I have completed upgrading the cube codebase to use the V1 call protocol. However, before I submit a patch I would really like to work out why I have never been able to get cube to pass installcheck. This is what I get when I run installcheck on a clean version of 8.1.4 (I get similar results on CVS HEAD). The regression.diff is attached. josh:~/installs/postgresql-8.1.4/contrib/cube josh$ make installcheck make -C ../../src/test/regress pg_regress make[1]: `pg_regress' is up to date. /bin/sh ../../src/test/regress/pg_regress --dbname=contrib_regression cube (using postmaster on Unix socket, default port) == dropping database contrib_regression == DROP DATABASE == creating database contrib_regression == CREATE DATABASE == dropping regression test user accounts == == running regression test queries== test cube ... FAILED == 1 of 1 tests failed. == I have tried this both on OS X and Linux and get similar results. Josh Reich Neil Conway wrote: On Mon, 2006-07-17 at 17:55 -0400, Joshua Reich wrote: Ok. So, the cube code looks very unmaintained (not to offend anyone), but it is all in V0 and I believe make installcheck fails out of the box due to new error message formats. It passes for me with CVS HEAD. The cube regression test is also run as part of the buildfarm process, so it sounds like an error on your end. *** ./expected/cube_1.out Sun Jun 26 21:19:43 2005 --- ./results/cube.out Tue Jul 18 09:44:14 2006 *** *** 258,310 -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '[(1)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[(1),]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[(1),2]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near 2 SELECT '[(1),(2),(3)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '1,'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT '1,2,'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT '1,,2'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '(1,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '(1,2,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '(1,,2)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , -- invalid input: semantic errors and trailing garbage SELECT '[(1),(2)],'::cube AS cube; -- 0 ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1 ERROR: bad cube representation DETAIL: different point dimensions in (1,2,3) and (2,3) --- 258,310 -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '[(1)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[(1),]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[(1),2]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near 2 SELECT '[(1),(2),(3)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near , SELECT '1,'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT '1,2,'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT '1,,2'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near , SELECT '(1,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error
Re: [HACKERS] [PATCHES] Proposed patch for contrib/cube
I upgraded to the latest version (2.3) as per the warning after running configure. Josh Andrew Dunstan wrote: What version of bison do you have? cheers andrew Joshua Reich wrote: I have completed upgrading the cube codebase to use the V1 call protocol. However, before I submit a patch I would really like to work out why I have never been able to get cube to pass installcheck. This is what I get when I run installcheck on a clean version of 8.1.4 (I get similar results on CVS HEAD). The regression.diff is attached. josh:~/installs/postgresql-8.1.4/contrib/cube josh$ make installcheck make -C ../../src/test/regress pg_regress make[1]: `pg_regress' is up to date. /bin/sh ../../src/test/regress/pg_regress --dbname=contrib_regression cube (using postmaster on Unix socket, default port) == dropping database contrib_regression == DROP DATABASE == creating database contrib_regression == CREATE DATABASE == dropping regression test user accounts == == running regression test queries== test cube ... FAILED == 1 of 1 tests failed. == I have tried this both on OS X and Linux and get similar results. Josh Reich Neil Conway wrote: On Mon, 2006-07-17 at 17:55 -0400, Joshua Reich wrote: Ok. So, the cube code looks very unmaintained (not to offend anyone), but it is all in V0 and I believe make installcheck fails out of the box due to new error message formats. It passes for me with CVS HEAD. The cube regression test is also run as part of the buildfarm process, so it sounds like an error on your end. *** ./expected/cube_1.outSun Jun 26 21:19:43 2005 --- ./results/cube.outTue Jul 18 09:44:14 2006 *** *** 258,310 -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '[(1)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[(1),]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[(1),2]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near 2 SELECT '[(1),(2),(3)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '1,'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT '1,2,'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT '1,,2'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '(1,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '(1,2,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '(1,,2)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , -- invalid input: semantic errors and trailing garbage SELECT '[(1),(2)],'::cube AS cube; -- 0 ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1 ERROR: bad cube representation DETAIL: different point dimensions in (1,2,3) and (2,3) --- 258,310 -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '[(1)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[(1),]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[(1),2]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near 2 SELECT '[(1),(2),(3)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near , SELECT '1,'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT '1,2,'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT '1,,2'::cube AS cube; ERROR: bad cube representation ! DETAIL:
Re: [HACKERS] [PATCHES] Proposed patch for contrib/cube
Then maybe you need to remove cubeparse.[ch] and try again. Bison changed the error message from parse error to syntax error in version 1.875 and it has been the same ever since, AFAIK. cheers andrew Joshua Reich wrote: I upgraded to the latest version (2.3) as per the warning after running configure. Josh Andrew Dunstan wrote: What version of bison do you have? cheers andrew Joshua Reich wrote: I have completed upgrading the cube codebase to use the V1 call protocol. However, before I submit a patch I would really like to work out why I have never been able to get cube to pass installcheck. This is what I get when I run installcheck on a clean version of 8.1.4 (I get similar results on CVS HEAD). The regression.diff is attached. josh:~/installs/postgresql-8.1.4/contrib/cube josh$ make installcheck make -C ../../src/test/regress pg_regress make[1]: `pg_regress' is up to date. /bin/sh ../../src/test/regress/pg_regress --dbname=contrib_regression cube (using postmaster on Unix socket, default port) == dropping database contrib_regression == DROP DATABASE == creating database contrib_regression == CREATE DATABASE == dropping regression test user accounts == == running regression test queries== test cube ... FAILED == 1 of 1 tests failed. == I have tried this both on OS X and Linux and get similar results. Josh Reich Neil Conway wrote: On Mon, 2006-07-17 at 17:55 -0400, Joshua Reich wrote: Ok. So, the cube code looks very unmaintained (not to offend anyone), but it is all in V0 and I believe make installcheck fails out of the box due to new error message formats. It passes for me with CVS HEAD. The cube regression test is also run as part of the buildfarm process, so it sounds like an error on your end. *** ./expected/cube_1.outSun Jun 26 21:19:43 2005 --- ./results/cube.outTue Jul 18 09:44:14 2006 *** *** 258,310 -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '[(1)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[(1),]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ] SELECT '[(1),2]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near 2 SELECT '[(1),(2),(3)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '1,'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT '1,2,'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at end of input SELECT '1,,2'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '(1,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '(1,2,)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near ) SELECT '(1,,2)'::cube AS cube; ERROR: bad cube representation ! DETAIL: syntax error at or near , -- invalid input: semantic errors and trailing garbage SELECT '[(1),(2)],'::cube AS cube; -- 0 ERROR: bad cube representation ! DETAIL: syntax error at or near , SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1 ERROR: bad cube representation DETAIL: different point dimensions in (1,2,3) and (2,3) --- 258,310 -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ) SELECT '[(1)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[(1),]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near ] SELECT '[(1),2]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near 2 SELECT '[(1),(2),(3)]'::cube AS cube; ERROR: bad cube representation ! DETAIL: parse error at or near , SELECT '1,'::cube AS cube; ERROR:
Re: [HACKERS] [PATCHES] Proposed patch for contrib/cube
Joshua Reich [EMAIL PROTECTED] writes: Andrew Dunstan wrote: What version of bison do you have? I upgraded to the latest version (2.3) as per the warning after running configure. Better look again, because you definitely seem to be using an old bison to build cubeparse.c. regards, tom lane ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] [PATCHES] Proposed patch for contrib/cube
I just downgraded from 2.3 to 1.875 and rebuilt everything, and now it works fine. As per Andrew's previous email, in 2.3 the error messages were changed from parse error to syntax error, causing the diff to fail. Josh Tom Lane wrote: Joshua Reich [EMAIL PROTECTED] writes: Andrew Dunstan wrote: What version of bison do you have? I upgraded to the latest version (2.3) as per the warning after running configure. Better look again, because you definitely seem to be using an old bison to build cubeparse.c. regards, tom lane ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly -- Joshua Reich Finance and Corporate Development ROOT Exchange, A Division of ROOT Markets 601 W. 26th St. / Suite 1500 New York, NY 10001 W - (212) 645 6320 x 7101 M / T - (646) 427 7959 E - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] [PATCHES] Proposed patch for contrib/cube
Joshua Reich [EMAIL PROTECTED] writes: if (PG_ARGISNULL(0) || PG_ARGISNULL(1)) { ereport(ERROR, (errcode(ERRCODE_ARRAY_ELEMENT_ERROR), errmsg(Cannot work with NULL arrays))); } This is useless code if the function is declared STRICT, as C functions most often are. What you *do* need to be checking is ARR_HASNULL(), since there isn't anything very useful you can do with null elements within the arrays. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match