File: scan.out

package info (click to toggle)
postgresql-16-age 1.6.0~rc0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,016 kB
  • sloc: ansic: 33,556; sql: 13,270; python: 2,530; yacc: 2,518; java: 1,418; lex: 1,325; perl: 294; sh: 286; makefile: 123; javascript: 24
file content (510 lines) | stat: -rw-r--r-- 23,793 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
SET extra_float_digits = 0;
LOAD 'age';
SET search_path TO ag_catalog;
SELECT create_graph('scan');
NOTICE:  graph "scan" has been created
 create_graph 
--------------
 
(1 row)

SELECT create_graph('scan');
ERROR:  graph "scan" already exists
--
-- multi-line comment
--
SELECT * FROM cypher('scan', $$
/*
 * multi-line comment
 */
RETURN 0
/**/
$$) AS t(a agtype);
 a 
---
 0
(1 row)

SELECT * FROM cypher('scan', $$
/* unterminated /* comment
RETURN 0
$$) AS t(a int);
ERROR:  unterminated /* comment at or near "/* unterminated /* comment
RETURN 0
"
LINE 2: /* unterminated /* comment
        ^
-- recover syntax highlighting */ */
--
-- single-line comment
--
SELECT * FROM cypher('scan', $$
// single-line
// comment
RETURN 0
$$) AS t(a agtype);
 a 
---
 0
(1 row)

--
-- decimal integer
--
SELECT * FROM cypher('scan', $$
RETURN 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
$$) AS t(a agtype, b agtype, c agtype, d agtype, e agtype,
         f agtype, g agtype, h agtype, i agtype, j agtype);
 a | b | c | d | e | f | g | h | i | j  
---+---+---+---+---+---+---+---+---+----
 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
(1 row)

SELECT * FROM cypher('scan', $$
RETURN 11, 22, 33, 44, 55, 66, 77, 88, 99
$$) AS t(a agtype, b agtype, c agtype, d agtype, e agtype,
         f agtype, g agtype, h agtype, i agtype);
 a  | b  | c  | d  | e  | f  | g  | h  | i  
----+----+----+----+----+----+----+----+----
 11 | 22 | 33 | 44 | 55 | 66 | 77 | 88 | 99
(1 row)

-- 2^31 - 1, 2^31
SELECT * FROM cypher('scan', $$
RETURN 2147483647, 2147483648
$$) AS t(a agtype, b agtype);
     a      |     b      
------------+------------
 2147483647 | 2147483648
(1 row)

--
-- octal integer
--
SELECT * FROM cypher('scan', $$
RETURN 00, 01, 02, 03, 04, 05, 06, 07, 010
$$) AS t(a agtype, b agtype, c agtype, d agtype, e agtype,
         f agtype, g agtype, h agtype, i agtype);
 a | b | c | d | e | f | g | h | i 
---+---+---+---+---+---+---+---+---
 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
(1 row)

SELECT * FROM cypher('scan', $$
RETURN 000, 011, 022, 033, 044, 055, 066, 077
$$) AS t(a agtype, b agtype, c agtype, d agtype, e agtype,
         f agtype, g agtype, h agtype);
 a | b | c  | d  | e  | f  | g  | h  
---+---+----+----+----+----+----+----
 0 | 9 | 18 | 27 | 36 | 45 | 54 | 63
(1 row)

-- 2^31 - 1, 2^31
SELECT * FROM cypher('scan', $$
RETURN 000000000000, 017777777777, 0020000000000
$$) AS t(a agtype, b agtype, c agtype);
 a |     b      |     c      
---+------------+------------
 0 | 2147483647 | 2147483648
(1 row)

-- 2^60 - 1, 2^64 - 1
SELECT * FROM cypher('scan', $$
RETURN 077777777777777777777, 01777777777777777777777
$$) AS t(a agtype, b agtype);
          a          |          b           
---------------------+----------------------
 1152921504606846975 | 1.84467440737096e+19
(1 row)

-- an invalid character after reading valid digits
SELECT * FROM cypher('scan', $$
RETURN 012345678
$$) AS t(a int);
ERROR:  invalid octal integer literal at or near "012345678"
LINE 2: RETURN 012345678
               ^
-- an invalid character after the leading "0"
SELECT * FROM cypher('scan', $$
RETURN 09
$$) AS t(a int);
ERROR:  invalid octal integer literal at or near "09"
LINE 2: RETURN 09
               ^
--
-- hexadecimal integer
--
SELECT * FROM cypher('scan', $$
RETURN 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9
$$) AS t(a agtype, b agtype, c agtype, d agtype, e agtype,
         f agtype, g agtype, h agtype, i agtype, j agtype);
 a | b | c | d | e | f | g | h | i | j 
---+---+---+---+---+---+---+---+---+---
 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
(1 row)

SELECT * FROM cypher('scan', $$
RETURN 0xA, 0xB, 0xC, 0xD, 0xE, 0xF
$$) AS t(a agtype, b agtype, c agtype, d agtype, e agtype, f agtype);
 a  | b  | c  | d  | e  | f  
----+----+----+----+----+----
 10 | 11 | 12 | 13 | 14 | 15
(1 row)

SELECT * FROM cypher('scan', $$
RETURN 0X00, 0X11, 0X22, 0X33, 0X44, 0X55, 0X66, 0X77, 0X88, 0X99
$$) AS t(a agtype, b agtype, c agtype, d agtype, e agtype,
         f agtype, g agtype, h agtype, i agtype, j agtype);
 a | b  | c  | d  | e  | f  |  g  |  h  |  i  |  j  
---+----+----+----+----+----+-----+-----+-----+-----
 0 | 17 | 34 | 51 | 68 | 85 | 102 | 119 | 136 | 153
(1 row)

SELECT * FROM cypher('scan', $$
RETURN 0XAa, 0XBb, 0XCc, 0XDd, 0XEe, 0xFf
$$) AS t(a agtype, b agtype, c agtype, d agtype, e agtype, f agtype);
  a  |  b  |  c  |  d  |  e  |  f  
-----+-----+-----+-----+-----+-----
 170 | 187 | 204 | 221 | 238 | 255
(1 row)

-- 2^31 - 1, 2^31
SELECT * FROM cypher('scan', $$
RETURN 0x00000000, 0x7FFFFFFF, 0x080000000
$$) AS t(a agtype, b agtype, c agtype);
 a |     b      |     c      
---+------------+------------
 0 | 2147483647 | 2147483648
(1 row)

-- 10^18, 2^64 - 1
SELECT * FROM cypher('scan', $$
RETURN 0xde0b6b3a7640000, 0xffffffffffffffff
$$) AS t(a agtype, b agtype);
          a          |          b           
---------------------+----------------------
 1000000000000000000 | 1.84467440737096e+19
(1 row)

-- an invalid character after reading valid digits
SELECT * FROM cypher('scan', $$
RETURN 0xF~
$$) AS t(a int);
ERROR:  syntax error at end of input
LINE 3: $$) AS t(a int);
        ^
-- an invalid character after the leading "0x"
SELECT * FROM cypher('scan', $$
RETURN 0x~
$$) AS t(a int);
ERROR:  invalid hexadecimal integer literal at or near "0x"
LINE 2: RETURN 0x~
               ^
-- "0x" followed by nothing
SELECT * FROM cypher('scan', $$
RETURN 0x
$$) AS t(a int);
ERROR:  invalid hexadecimal integer literal at or near "0x"
LINE 2: RETURN 0x
               ^
--
-- decimal
--
SELECT * FROM cypher('scan', $$
RETURN 03., 3.141592, .141592
$$) AS t(a agtype, b agtype, c agtype);
  a  |    b     |    c     
-----+----------+----------
 3.0 | 3.141592 | 0.141592
(1 row)

-- "0" and ".."
SELECT * FROM cypher('scan', $$
RETURN 0..
$$) AS t(a text, b text, c text);
ERROR:  syntax error at or near ".."
LINE 2: RETURN 0..
                ^
--
-- scientific notation
--
SELECT * FROM cypher('scan', $$
RETURN 3141592e-6, 3.141592E0, .3141592e+1
$$) AS t(a agtype, b agtype, c agtype);
    a     |    b     |    c     
----------+----------+----------
 3.141592 | 3.141592 | 3.141592
(1 row)

-- invalid exponent parts
SELECT * FROM cypher('scan', $$
RETURN 3141592e-
$$) AS t(a text);
ERROR:  invalid scientific notation literal at or near "3141592e-"
LINE 2: RETURN 3141592e-
               ^
SELECT * FROM cypher('scan', $$
RETURN 3.141592E
$$) AS t(a text);
ERROR:  invalid scientific notation literal at or near "3.141592E"
LINE 2: RETURN 3.141592E
               ^
SELECT * FROM cypher('scan', $$
RETURN .3141592e+
$$) AS t(a text);
ERROR:  invalid scientific notation literal at or near ".3141592e+"
LINE 2: RETURN .3141592e+
               ^
--
-- quoted string
--
-- a long string
SELECT * FROM cypher('scan', $$
RETURN " !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
$$) AS t(a agtype);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      a                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 " !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
(1 row)

-- escape sequences
SELECT * FROM cypher('scan', $$
RETURN " \" \" ' \' ", ' \' \' " \" ', " / \/ \\ \b \f \n \r \t "
$$) AS t(a agtype, b agtype, c agtype);
       a       |       b       |             c             
---------------+---------------+---------------------------
 " \" \" ' ' " | " ' ' \" \" " | " / / \\ \b \f \n \r \t "
(1 row)

-- invalid escape sequence
SELECT * FROM cypher('scan', $$
RETURN "\a"
$$) AS t(a text);
ERROR:  invalid escape sequence at or near "\a"
LINE 2: RETURN "\a"
                ^
DETAIL:  Valid escape sequences are \", \', \/, \\, \b, \f, \n, \r, \t, \uXXXX, and \UXXXXXXXX.
-- Unicode escape sequences
SELECT * FROM cypher('scan', $$
RETURN "\u03A9 (GREEK CAPITAL LETTER OMEGA, U+03A9, Ω)",
       "\U0001d6e9 (MATHEMATICAL ITALIC CAPITAL THETA, U+1D6E9, 𝛩)",
       "\ud835\U0000DEF0 (MATHEMATICAL ITALIC CAPITAL OMICRON, U+1D6F0, 𝛰)",
       "\u002E (FULL STOP, U+002E, .)"
$$) AS t(a agtype, b agtype, c agtype, d agtype);
                      a                      |                          b                          |                           c                           |             d              
---------------------------------------------+-----------------------------------------------------+-------------------------------------------------------+----------------------------
 "Ω (GREEK CAPITAL LETTER OMEGA, U+03A9, Ω)" | "𝛩 (MATHEMATICAL ITALIC CAPITAL THETA, U+1D6E9, 𝛩)" | "𝛰 (MATHEMATICAL ITALIC CAPITAL OMICRON, U+1D6F0, 𝛰)" | ". (FULL STOP, U+002E, .)"
(1 row)

-- invalid Unicode surrogate pair (need a low surrogate)
SELECT * FROM cypher('scan', $$
RETURN "\uD835"
$$) AS t(a text);
ERROR:  invalid Unicode surrogate pair at or near """
LINE 2: RETURN "\uD835"
                      ^
DETAIL:  A low surrogate must follow a high surrogate.
-- invalid Unicode surrogate pair (not a low surrogate)
SELECT * FROM cypher('scan', $$
RETURN "\uD835\u002E"
$$) AS t(a text);
ERROR:  invalid Unicode surrogate pair at or near "\u002E"
LINE 2: RETURN "\uD835\u002E"
                      ^
DETAIL:  A low surrogate must follow a high surrogate.
-- invalid Unicode surrogate pair (need a high surrogate)
SELECT * FROM cypher('scan', $$
RETURN "\uDEF0"
$$) AS t(a text);
ERROR:  invalid Unicode surrogate pair at or near "\uDEF0"
LINE 2: RETURN "\uDEF0"
                ^
DETAIL:  A low surrogate must follow a high surrogate.
-- invalid Unicode escape value (must be less than or equal to 10FFFF)
SELECT * FROM cypher('scan', $$
RETURN "\U00110000"
$$) AS t(a text);
ERROR:  invalid Unicode escape value at or near "\U00110000"
LINE 2: RETURN "\U00110000"
                ^
DETAIL:  Unicode escape values cannot be greater than 10FFFF, which is the maximum value of a code point.
-- unsupported Unicode escape value ('\0' is not allowed)
SELECT * FROM cypher('scan', $$
RETURN "\u0000"
$$) AS t(a text);
ERROR:  unsupported Unicode escape value at or near "\u0000"
LINE 2: RETURN "\u0000"
                ^
DETAIL:  Unicode code point value 0000 is not allowed in quoted strings.
-- unsupported Unicode escape value (the server encoding is not UTF8)
CREATE DATABASE contrib_regression_age_euc_kr
  TEMPLATE template0
  ENCODING EUC_KR
  LC_COLLATE 'C' LC_CTYPE 'C';
\c contrib_regression_age_euc_kr
CREATE EXTENSION age;
LOAD 'age';
SET search_path TO ag_catalog;
SELECT create_graph('scan');
NOTICE:  graph "scan" has been created
 create_graph 
--------------
 
(1 row)

SELECT * FROM cypher('scan', $$
RETURN "\U0001D706"
$$) AS t(a text);
ERROR:  unsupported Unicode escape value at or near "\U0001D706"
LINE 2: RETURN "\U0001D706"
                ^
DETAIL:  Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8.
SELECT drop_graph('scan', true);
NOTICE:  drop cascades to 2 other objects
DETAIL:  drop cascades to table scan._ag_label_vertex
drop cascades to table scan._ag_label_edge
NOTICE:  graph "scan" has been dropped
 drop_graph 
------------
 
(1 row)

\c contrib_regression
DROP DATABASE contrib_regression_age_euc_kr;
LOAD 'age';
SET search_path TO ag_catalog;
-- invalid Unicode escape sequence (must be \uXXXX or \UXXXXXXXX)
SELECT * FROM cypher('scan', $$
RETURN "\UD835"
$$) AS t(a text);
ERROR:  invalid Unicode escape sequence at or near "\UD835"
LINE 2: RETURN "\UD835"
                ^
HINT:  Unicode escape sequences must be \uXXXX or \UXXXXXXXX.
SELECT * FROM cypher('scan', $$
RETURN "\uD835\uDEF"
$$) AS t(a text);
ERROR:  invalid Unicode escape sequence at or near "\uDEF"
LINE 2: RETURN "\uD835\uDEF"
                      ^
HINT:  Unicode escape sequences must be \uXXXX or \UXXXXXXXX.
-- unterminated quoted strings
SELECT * FROM cypher('scan', $$RETURN "unterminated quoted string$$) AS t(a text);
ERROR:  unterminated quoted string at or near ""unterminated quoted string"
LINE 1: SELECT * FROM cypher('scan', $$RETURN "unterminated quoted s...
                                              ^
-- recover syntax highlighting "
SELECT * FROM cypher('scan', $$RETURN 'unterminated quoted string$$) AS t(a text);
ERROR:  unterminated quoted string at or near "'unterminated quoted string"
LINE 1: SELECT * FROM cypher('scan', $$RETURN 'unterminated quoted s...
                                              ^
-- recover syntax highlighting '
SELECT * FROM cypher('scan', $$RETURN "escape \$$) AS t(a text);
ERROR:  unterminated quoted string at or near ""escape \"
LINE 1: SELECT * FROM cypher('scan', $$RETURN "escape \$$) AS t(a te...
                                              ^
-- recover syntax highlighting "
SELECT * FROM cypher('scan', $$RETURN "high surrogate \uD835$$) AS t(a text);
ERROR:  unterminated quoted string at or near ""high surrogate \uD835"
LINE 1: SELECT * FROM cypher('scan', $$RETURN "high surrogate \uD835...
                                              ^
-- recover syntax highlighting "
--
-- identifier
--
-- check that they are accepted as identifier (all tests throw an error)
SELECT * FROM cypher('scan', $$
RETURN _$09A_z
$$) AS t(id text);
ERROR:  could not find rte for _$09A_z
LINE 2: RETURN _$09A_z
               ^
SELECT * FROM cypher('scan', $$
RETURN A
$$) AS t(id text);
ERROR:  could not find rte for A
LINE 2: RETURN A
               ^
SELECT * FROM cypher('scan', $$
RETURN z
$$) AS t(id text);
ERROR:  could not find rte for z
LINE 2: RETURN z
               ^
SELECT * FROM cypher('scan', $$
RETURN `$`
$$) AS t(id text);
ERROR:  could not find rte for $
LINE 2: RETURN `$`
               ^
SELECT * FROM cypher('scan', $$
RETURN `0`
$$) AS t(id text);
ERROR:  could not find rte for 0
LINE 2: RETURN `0`
               ^
SELECT * FROM cypher('scan', $$
RETURN ````
$$) AS t(id text);
ERROR:  could not find rte for `
LINE 2: RETURN ````
               ^
-- zero-length quoted identifier
SELECT * FROM cypher('scan', $$
RETURN ``
$$) AS t(a text);
ERROR:  zero-length quoted identifier at or near "``"
LINE 2: RETURN ``
               ^
SELECT * FROM cypher('scan', $$
RETURN `unterminated quoted identifier
$$) AS t(a text);
ERROR:  unterminated quoted identifier at or near "`unterminated quoted identifier
"
LINE 2: RETURN `unterminated quoted identifier
               ^
-- recover syntax highlighting `
--
-- parameter
--
-- invalid parameter names
SELECT * FROM cypher('scan', $cypher$
RETURN $$
$cypher$) AS t(a text);
ERROR:  unexpected character at or near "$"
LINE 2: RETURN $$
               ^
SELECT * FROM cypher('scan', $$
RETURN $0
$$) AS t(a text);
ERROR:  unexpected character at or near "$"
LINE 2: RETURN $0
               ^
SELECT drop_graph('scan', true);
NOTICE:  drop cascades to 2 other objects
DETAIL:  drop cascades to table scan._ag_label_vertex
drop cascades to table scan._ag_label_edge
NOTICE:  graph "scan" has been dropped
 drop_graph 
------------
 
(1 row)