Обсуждение: Re: [PATCHES] Proposed patch for contrib/cube

Поиск
Список
Период
Сортировка

Re: [PATCHES] Proposed patch for contrib/cube

От
Joshua Reich
Дата:
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:  parse error at or near ")"
  SELECT '(1,,2)'::cube AS cube;
  ERROR:  bad cube representation
! DETAIL:  parse error at or near ","
  -- invalid input: semantic errors and trailing garbage
  SELECT '[(1),(2)],'::cube AS cube; -- 0
  ERROR:  bad cube representation
! DETAIL:  parse 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)
***************
*** 313,319 ****
  DETAIL:  different point dimensions in (1,2) and (1,2,3)
  SELECT '(1),(2),'::cube AS cube; -- 2
  ERROR:  bad cube representation
! DETAIL:  syntax error at or near ","
  SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
  ERROR:  bad cube representation
  DETAIL:  different point dimensions in (1,2,3) and (2,3)
--- 313,319 ----
  DETAIL:  different point dimensions in (1,2) and (1,2,3)
  SELECT '(1),(2),'::cube AS cube; -- 2
  ERROR:  bad cube representation
! DETAIL:  parse error at or near ","
  SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
  ERROR:  bad cube representation
  DETAIL:  different point dimensions in (1,2,3) and (2,3)
***************
*** 322,346 ****
  DETAIL:  different point dimensions in (1,2) and (1,2,3)
  SELECT '(1,2,3)ab'::cube AS cube; -- 4
  ERROR:  bad cube representation
! DETAIL:  syntax error at or near "a"
  SELECT '(1,2,3)a'::cube AS cube; -- 5
  ERROR:  bad cube representation
! DETAIL:  syntax error at or near "a"
  SELECT '(1,2)('::cube AS cube; -- 5
  ERROR:  bad cube representation
! DETAIL:  syntax error at or near "("
  SELECT '1,2ab'::cube AS cube; -- 6
  ERROR:  bad cube representation
! DETAIL:  syntax error at or near "a"
  SELECT '1 e7'::cube AS cube; -- 6
  ERROR:  bad cube representation
! DETAIL:  syntax error at or near "e"
  SELECT '1,2a'::cube AS cube; -- 7
  ERROR:  bad cube representation
! DETAIL:  syntax error at or near "a"
  SELECT '1..2'::cube AS cube; -- 7
  ERROR:  bad cube representation
! DETAIL:  syntax error at or near ".2"
  --
  -- Testing building cubes from float8 values
  --
--- 322,346 ----
  DETAIL:  different point dimensions in (1,2) and (1,2,3)
  SELECT '(1,2,3)ab'::cube AS cube; -- 4
  ERROR:  bad cube representation
! DETAIL:  parse error at or near "a"
  SELECT '(1,2,3)a'::cube AS cube; -- 5
  ERROR:  bad cube representation
! DETAIL:  parse error at or near "a"
  SELECT '(1,2)('::cube AS cube; -- 5
  ERROR:  bad cube representation
! DETAIL:  parse error at or near "("
  SELECT '1,2ab'::cube AS cube; -- 6
  ERROR:  bad cube representation
! DETAIL:  parse error at or near "a"
  SELECT '1 e7'::cube AS cube; -- 6
  ERROR:  bad cube representation
! DETAIL:  parse error at or near "e"
  SELECT '1,2a'::cube AS cube; -- 7
  ERROR:  bad cube representation
! DETAIL:  parse error at or near "a"
  SELECT '1..2'::cube AS cube; -- 7
  ERROR:  bad cube representation
! DETAIL:  parse error at or near ".2"
  --
  -- Testing building cubes from float8 values
  --

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


Re: [PATCHES] Proposed patch for contrib/cube

От
Andrew Dunstan
Дата:

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 at or near ")"
>  SELECT '(1,2,)'::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 ","
>  -- invalid input: semantic errors and trailing garbage
>  SELECT '[(1),(2)],'::cube AS cube; -- 0
>  ERROR:  bad cube representation
>! DETAIL:  parse 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)
>***************
>*** 313,319 ****
>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>  SELECT '(1),(2),'::cube AS cube; -- 2
>  ERROR:  bad cube representation
>! DETAIL:  syntax error at or near ","
>  SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
>  ERROR:  bad cube representation
>  DETAIL:  different point dimensions in (1,2,3) and (2,3)
>--- 313,319 ----
>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>  SELECT '(1),(2),'::cube AS cube; -- 2
>  ERROR:  bad cube representation
>! DETAIL:  parse error at or near ","
>  SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
>  ERROR:  bad cube representation
>  DETAIL:  different point dimensions in (1,2,3) and (2,3)
>***************
>*** 322,346 ****
>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>  SELECT '(1,2,3)ab'::cube AS cube; -- 4
>  ERROR:  bad cube representation
>! DETAIL:  syntax error at or near "a"
>  SELECT '(1,2,3)a'::cube AS cube; -- 5
>  ERROR:  bad cube representation
>! DETAIL:  syntax error at or near "a"
>  SELECT '(1,2)('::cube AS cube; -- 5
>  ERROR:  bad cube representation
>! DETAIL:  syntax error at or near "("
>  SELECT '1,2ab'::cube AS cube; -- 6
>  ERROR:  bad cube representation
>! DETAIL:  syntax error at or near "a"
>  SELECT '1 e7'::cube AS cube; -- 6
>  ERROR:  bad cube representation
>! DETAIL:  syntax error at or near "e"
>  SELECT '1,2a'::cube AS cube; -- 7
>  ERROR:  bad cube representation
>! DETAIL:  syntax error at or near "a"
>  SELECT '1..2'::cube AS cube; -- 7
>  ERROR:  bad cube representation
>! DETAIL:  syntax error at or near ".2"
>  --
>  -- Testing building cubes from float8 values
>  --
>--- 322,346 ----
>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>  SELECT '(1,2,3)ab'::cube AS cube; -- 4
>  ERROR:  bad cube representation
>! DETAIL:  parse error at or near "a"
>  SELECT '(1,2,3)a'::cube AS cube; -- 5
>  ERROR:  bad cube representation
>! DETAIL:  parse error at or near "a"
>  SELECT '(1,2)('::cube AS cube; -- 5
>  ERROR:  bad cube representation
>! DETAIL:  parse error at or near "("
>  SELECT '1,2ab'::cube AS cube; -- 6
>  ERROR:  bad cube representation
>! DETAIL:  parse error at or near "a"
>  SELECT '1 e7'::cube AS cube; -- 6
>  ERROR:  bad cube representation
>! DETAIL:  parse error at or near "e"
>  SELECT '1,2a'::cube AS cube; -- 7
>  ERROR:  bad cube representation
>! DETAIL:  parse error at or near "a"
>  SELECT '1..2'::cube AS cube; -- 7
>  ERROR:  bad cube representation
>! DETAIL:  parse error at or near ".2"
>  --
>  -- Testing building cubes from float8 values
>  --
>
>======================================================================
>
>  
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: don't forget to increase your free space map settings
>  
>



Re: [PATCHES] Proposed patch for contrib/cube

От
Joshua Reich
Дата:
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.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:  parse error at or near ")"
>>  SELECT '(1,,2)'::cube AS cube;
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near ","
>>  -- invalid input: semantic errors and trailing garbage
>>  SELECT '[(1),(2)],'::cube AS cube; -- 0
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse 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)
>> ***************
>> *** 313,319 ****
>>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>>  SELECT '(1),(2),'::cube AS cube; -- 2
>>  ERROR:  bad cube representation
>> ! DETAIL:  syntax error at or near ","
>>  SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
>>  ERROR:  bad cube representation
>>  DETAIL:  different point dimensions in (1,2,3) and (2,3)
>> --- 313,319 ----
>>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>>  SELECT '(1),(2),'::cube AS cube; -- 2
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near ","
>>  SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
>>  ERROR:  bad cube representation
>>  DETAIL:  different point dimensions in (1,2,3) and (2,3)
>> ***************
>> *** 322,346 ****
>>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>>  SELECT '(1,2,3)ab'::cube AS cube; -- 4
>>  ERROR:  bad cube representation
>> ! DETAIL:  syntax error at or near "a"
>>  SELECT '(1,2,3)a'::cube AS cube; -- 5
>>  ERROR:  bad cube representation
>> ! DETAIL:  syntax error at or near "a"
>>  SELECT '(1,2)('::cube AS cube; -- 5
>>  ERROR:  bad cube representation
>> ! DETAIL:  syntax error at or near "("
>>  SELECT '1,2ab'::cube AS cube; -- 6
>>  ERROR:  bad cube representation
>> ! DETAIL:  syntax error at or near "a"
>>  SELECT '1 e7'::cube AS cube; -- 6
>>  ERROR:  bad cube representation
>> ! DETAIL:  syntax error at or near "e"
>>  SELECT '1,2a'::cube AS cube; -- 7
>>  ERROR:  bad cube representation
>> ! DETAIL:  syntax error at or near "a"
>>  SELECT '1..2'::cube AS cube; -- 7
>>  ERROR:  bad cube representation
>> ! DETAIL:  syntax error at or near ".2"
>>  --
>>  -- Testing building cubes from float8 values
>>  --
>> --- 322,346 ----
>>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>>  SELECT '(1,2,3)ab'::cube AS cube; -- 4
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near "a"
>>  SELECT '(1,2,3)a'::cube AS cube; -- 5
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near "a"
>>  SELECT '(1,2)('::cube AS cube; -- 5
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near "("
>>  SELECT '1,2ab'::cube AS cube; -- 6
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near "a"
>>  SELECT '1 e7'::cube AS cube; -- 6
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near "e"
>>  SELECT '1,2a'::cube AS cube; -- 7
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near "a"
>>  SELECT '1..2'::cube AS cube; -- 7
>>  ERROR:  bad cube representation
>> ! DETAIL:  parse error at or near ".2"
>>  --
>>  -- Testing building cubes from float8 values
>>  --
>>
>> ======================================================================
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: don't forget to increase your free space map settings
>>  
>>
> 

-- 
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 - josh@rootexchange.com


Re: [PATCHES] Proposed patch for contrib/cube

От
Andrew Dunstan
Дата:
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.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:  parse error at or near ")"
>>>  SELECT '(1,,2)'::cube AS cube;
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near ","
>>>  -- invalid input: semantic errors and trailing garbage
>>>  SELECT '[(1),(2)],'::cube AS cube; -- 0
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse 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)
>>> ***************
>>> *** 313,319 ****
>>>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>>>  SELECT '(1),(2),'::cube AS cube; -- 2
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  syntax error at or near ","
>>>  SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
>>>  ERROR:  bad cube representation
>>>  DETAIL:  different point dimensions in (1,2,3) and (2,3)
>>> --- 313,319 ----
>>>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>>>  SELECT '(1),(2),'::cube AS cube; -- 2
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near ","
>>>  SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
>>>  ERROR:  bad cube representation
>>>  DETAIL:  different point dimensions in (1,2,3) and (2,3)
>>> ***************
>>> *** 322,346 ****
>>>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>>>  SELECT '(1,2,3)ab'::cube AS cube; -- 4
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  syntax error at or near "a"
>>>  SELECT '(1,2,3)a'::cube AS cube; -- 5
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  syntax error at or near "a"
>>>  SELECT '(1,2)('::cube AS cube; -- 5
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  syntax error at or near "("
>>>  SELECT '1,2ab'::cube AS cube; -- 6
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  syntax error at or near "a"
>>>  SELECT '1 e7'::cube AS cube; -- 6
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  syntax error at or near "e"
>>>  SELECT '1,2a'::cube AS cube; -- 7
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  syntax error at or near "a"
>>>  SELECT '1..2'::cube AS cube; -- 7
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  syntax error at or near ".2"
>>>  --
>>>  -- Testing building cubes from float8 values
>>>  --
>>> --- 322,346 ----
>>>  DETAIL:  different point dimensions in (1,2) and (1,2,3)
>>>  SELECT '(1,2,3)ab'::cube AS cube; -- 4
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near "a"
>>>  SELECT '(1,2,3)a'::cube AS cube; -- 5
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near "a"
>>>  SELECT '(1,2)('::cube AS cube; -- 5
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near "("
>>>  SELECT '1,2ab'::cube AS cube; -- 6
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near "a"
>>>  SELECT '1 e7'::cube AS cube; -- 6
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near "e"
>>>  SELECT '1,2a'::cube AS cube; -- 7
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near "a"
>>>  SELECT '1..2'::cube AS cube; -- 7
>>>  ERROR:  bad cube representation
>>> ! DETAIL:  parse error at or near ".2"
>>>  --
>>>  -- Testing building cubes from float8 values
>>>  --
>>>
>>> ======================================================================
>>>
>>>  
>>>
>>> ------------------------------------------------------------------------ 
>>>
>>>
>>>
>>> ---------------------------(end of 
>>> broadcast)---------------------------
>>> TIP 5: don't forget to increase your free space map settings
>>>  
>>>
>>
>



Re: [PATCHES] Proposed patch for contrib/cube

От
Tom Lane
Дата:
Joshua Reich <josh@root.net> 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


Re: [PATCHES] Proposed patch for contrib/cube

От
Joshua Reich
Дата:
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 <josh@root.net> 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 majordomo@postgresql.org 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 - josh@rootexchange.com