Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb153c09

Browse files
committed
Add a bunch of new error location reports to parse-analysis error messages.
There are still some weak spots around JOIN USING and relation alias lists,but most errors reported within backend/parser/ now have locations.
1 parent9ac4299 commitb153c09

File tree

103 files changed

+1877
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1877
-485
lines changed

‎contrib/cube/expected/cube.out

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

‎contrib/cube/expected/cube_1.out

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp