@@ -257,88 +257,144 @@ SELECT '[(0,0,0,0),(1,0,0,0)]'::cube AS cube;
257257-- invalid input: parse errors
258258SELECT ''::cube AS cube;
259259ERROR: bad cube representation
260+ LINE 1: SELECT ''::cube AS cube;
261+ ^
260262DETAIL: syntax error at end of input
261263SELECT 'ABC'::cube AS cube;
262264ERROR: bad cube representation
265+ LINE 1: SELECT 'ABC'::cube AS cube;
266+ ^
263267DETAIL: syntax error at or near "A"
264268SELECT '()'::cube AS cube;
265269ERROR: bad cube representation
270+ LINE 1: SELECT '()'::cube AS cube;
271+ ^
266272DETAIL: syntax error at or near ")"
267273SELECT '[]'::cube AS cube;
268274ERROR: bad cube representation
275+ LINE 1: SELECT '[]'::cube AS cube;
276+ ^
269277DETAIL: syntax error at or near "]"
270278SELECT '[()]'::cube AS cube;
271279ERROR: bad cube representation
280+ LINE 1: SELECT '[()]'::cube AS cube;
281+ ^
272282DETAIL: syntax error at or near ")"
273283SELECT '[(1)]'::cube AS cube;
274284ERROR: bad cube representation
285+ LINE 1: SELECT '[(1)]'::cube AS cube;
286+ ^
275287DETAIL: syntax error at or near "]"
276288SELECT '[(1),]'::cube AS cube;
277289ERROR: bad cube representation
290+ LINE 1: SELECT '[(1),]'::cube AS cube;
291+ ^
278292DETAIL: syntax error at or near "]"
279293SELECT '[(1),2]'::cube AS cube;
280294ERROR: bad cube representation
295+ LINE 1: SELECT '[(1),2]'::cube AS cube;
296+ ^
281297DETAIL: syntax error at or near "2"
282298SELECT '[(1),(2),(3)]'::cube AS cube;
283299ERROR: bad cube representation
300+ LINE 1: SELECT '[(1),(2),(3)]'::cube AS cube;
301+ ^
284302DETAIL: syntax error at or near ","
285303SELECT '1,'::cube AS cube;
286304ERROR: bad cube representation
305+ LINE 1: SELECT '1,'::cube AS cube;
306+ ^
287307DETAIL: syntax error at end of input
288308SELECT '1,2,'::cube AS cube;
289309ERROR: bad cube representation
310+ LINE 1: SELECT '1,2,'::cube AS cube;
311+ ^
290312DETAIL: syntax error at end of input
291313SELECT '1,,2'::cube AS cube;
292314ERROR: bad cube representation
315+ LINE 1: SELECT '1,,2'::cube AS cube;
316+ ^
293317DETAIL: syntax error at or near ","
294318SELECT '(1,)'::cube AS cube;
295319ERROR: bad cube representation
320+ LINE 1: SELECT '(1,)'::cube AS cube;
321+ ^
296322DETAIL: syntax error at or near ")"
297323SELECT '(1,2,)'::cube AS cube;
298324ERROR: bad cube representation
325+ LINE 1: SELECT '(1,2,)'::cube AS cube;
326+ ^
299327DETAIL: syntax error at or near ")"
300328SELECT '(1,,2)'::cube AS cube;
301329ERROR: bad cube representation
330+ LINE 1: SELECT '(1,,2)'::cube AS cube;
331+ ^
302332DETAIL: syntax error at or near ","
303333-- invalid input: semantic errors and trailing garbage
304334SELECT '[(1),(2)],'::cube AS cube; -- 0
305335ERROR: bad cube representation
336+ LINE 1: SELECT '[(1),(2)],'::cube AS cube;
337+ ^
306338DETAIL: syntax error at or near ","
307339SELECT '[(1,2,3),(2,3)]'::cube AS cube; -- 1
308340ERROR: bad cube representation
341+ LINE 1: SELECT '[(1,2,3),(2,3)]'::cube AS cube;
342+ ^
309343DETAIL: Different point dimensions in (1,2,3) and (2,3).
310344SELECT '[(1,2),(1,2,3)]'::cube AS cube; -- 1
311345ERROR: bad cube representation
346+ LINE 1: SELECT '[(1,2),(1,2,3)]'::cube AS cube;
347+ ^
312348DETAIL: Different point dimensions in (1,2) and (1,2,3).
313349SELECT '(1),(2),'::cube AS cube; -- 2
314350ERROR: bad cube representation
351+ LINE 1: SELECT '(1),(2),'::cube AS cube;
352+ ^
315353DETAIL: syntax error at or near ","
316354SELECT '(1,2,3),(2,3)'::cube AS cube; -- 3
317355ERROR: bad cube representation
356+ LINE 1: SELECT '(1,2,3),(2,3)'::cube AS cube;
357+ ^
318358DETAIL: Different point dimensions in (1,2,3) and (2,3).
319359SELECT '(1,2),(1,2,3)'::cube AS cube; -- 3
320360ERROR: bad cube representation
361+ LINE 1: SELECT '(1,2),(1,2,3)'::cube AS cube;
362+ ^
321363DETAIL: Different point dimensions in (1,2) and (1,2,3).
322364SELECT '(1,2,3)ab'::cube AS cube; -- 4
323365ERROR: bad cube representation
366+ LINE 1: SELECT '(1,2,3)ab'::cube AS cube;
367+ ^
324368DETAIL: syntax error at or near "a"
325369SELECT '(1,2,3)a'::cube AS cube; -- 5
326370ERROR: bad cube representation
371+ LINE 1: SELECT '(1,2,3)a'::cube AS cube;
372+ ^
327373DETAIL: syntax error at or near "a"
328374SELECT '(1,2)('::cube AS cube; -- 5
329375ERROR: bad cube representation
376+ LINE 1: SELECT '(1,2)('::cube AS cube;
377+ ^
330378DETAIL: syntax error at or near "("
331379SELECT '1,2ab'::cube AS cube; -- 6
332380ERROR: bad cube representation
381+ LINE 1: SELECT '1,2ab'::cube AS cube;
382+ ^
333383DETAIL: syntax error at or near "a"
334384SELECT '1 e7'::cube AS cube; -- 6
335385ERROR: bad cube representation
386+ LINE 1: SELECT '1 e7'::cube AS cube;
387+ ^
336388DETAIL: syntax error at or near "e"
337389SELECT '1,2a'::cube AS cube; -- 7
338390ERROR: bad cube representation
391+ LINE 1: SELECT '1,2a'::cube AS cube;
392+ ^
339393DETAIL: syntax error at or near "a"
340394SELECT '1..2'::cube AS cube; -- 7
341395ERROR: bad cube representation
396+ LINE 1: SELECT '1..2'::cube AS cube;
397+ ^
342398DETAIL: syntax error at or near ".2"
343399--
344400-- Testing building cubes from float8 values
@@ -430,9 +486,13 @@ ERROR: Index out of bounds
430486--
431487select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0)'::cube;
435493ERROR: bad cube representation
494+ LINE 1: select '(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
495+ ^
436496DETAIL: A cube cannot have more than 100 dimensions.
437497--
438498-- testing the operators