aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/postgresql/cases/name.err
blob: 85c245513f510605f55403ee88d6f76614a71d66 (plain) (blame)
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
<sql-statement>
--
-- NAME
-- all inputs are silently truncated at NAMEDATALEN-1 (63) characters
--
-- fixed-length by reference
SELECT name 'name string' = name 'name string' AS "True";
</sql-statement>
<sql-statement>
SELECT name 'name string' = name 'name string ' AS "False";
</sql-statement>
<sql-statement>
--
--
--
CREATE TABLE NAME_TBL(f1 name);
</sql-statement>
<sql-statement>
INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR');
</sql-statement>
<sql-statement>
INSERT INTO NAME_TBL(f1) VALUES ('1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr');
</sql-statement>
<sql-statement>
INSERT INTO NAME_TBL(f1) VALUES ('asdfghjkl;');
</sql-statement>
<sql-statement>
INSERT INTO NAME_TBL(f1) VALUES ('343f%2a');
</sql-statement>
<sql-statement>
INSERT INTO NAME_TBL(f1) VALUES ('d34aaasdf');
</sql-statement>
<sql-statement>
INSERT INTO NAME_TBL(f1) VALUES ('');
</sql-statement>
<sql-statement>
INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ');
</sql-statement>
<sql-statement>
SELECT * FROM NAME_TBL;
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 <> '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 < '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 <= '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 > '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 >= '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 !~ '.*';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 ~ '[0-9]';
</sql-statement>
<sql-statement>
SELECT c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*asdf.*';
</sql-statement>
<sql-statement>
DROP TABLE NAME_TBL;
</sql-statement>
<sql-statement>
DO $$
DECLARE r text[];
BEGIN
  r := parse_ident('Schemax.Tabley');
  RAISE NOTICE '%', format('%I.%I', r[1], r[2]);
  r := parse_ident('"SchemaX"."TableY"');
  RAISE NOTICE '%', format('%I.%I', r[1], r[2]);
END;
$$;
</sql-statement>
-stdin-:<main>: Error: Parse Sql

    -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 263
    	DO $$
	^
<sql-statement>
SELECT parse_ident('foo.boo');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident('foo.boo');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident('foo.boo');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident('foo.boo');
	       ^
<sql-statement>
SELECT parse_ident('foo.boo[]'); -- should fail
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident('foo.boo[]'); -- should fail
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident('foo.boo[]'); -- should fail
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident('foo.boo[]'); -- should fail
	       ^
<sql-statement>
SELECT parse_ident('foo.boo[]', strict => false); -- ok
</sql-statement>
-stdin-:<main>: Error: Parse Sql

    -stdin-:<main>:1:8: Error: alternative is not implemented yet : 118
    	SELECT parse_ident('foo.boo[]', strict => false); -- ok
	       ^
<sql-statement>
-- should fail
SELECT parse_ident(' ');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	-- should fail
	^
        -stdin-:<main>:2:8: Error: At function: PgCall
        	SELECT parse_ident(' ');
	       ^
            -stdin-:<main>:2:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident(' ');
	       ^
<sql-statement>
SELECT parse_ident(' .aaa');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident(' .aaa');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident(' .aaa');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident(' .aaa');
	       ^
<sql-statement>
SELECT parse_ident(' aaa . ');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident(' aaa . ');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident(' aaa . ');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident(' aaa . ');
	       ^
<sql-statement>
SELECT parse_ident('aaa.a%b');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident('aaa.a%b');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident('aaa.a%b');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident('aaa.a%b');
	       ^
<sql-statement>
SELECT parse_ident(E'X\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident(E'X\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident(E'X\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident(E'X\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
	       ^
<sql-statement>
SELECT length(a[1]), length(a[2]) from parse_ident('"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy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yyyyyyyyyyyyyyyyyyyyyy') as a ;
	       ^
<sql-statement>
SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (text)
            	SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"');
	       ^
<sql-statement>
SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"')::name[];
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"')::name[];
	^
        -stdin-:<main>:1:91: Error: At function: PgCast
        	SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"')::name[];
	                                                                                          ^
            -stdin-:<main>:1:8: Error: At function: PgCall
            	SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"')::name[];
	       ^
                -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (text)
                	SELECT parse_ident(' first . "  second  " ."   third   ". "  ' || repeat('x',66) || '"')::name[];
	       ^
<sql-statement>
SELECT parse_ident(E'"c".X XXXX\002XXXXXX');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident(E'"c".X XXXX\002XXXXXX');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident(E'"c".X XXXX\002XXXXXX');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident(E'"c".X XXXX\002XXXXXX');
	       ^
<sql-statement>
SELECT parse_ident('1020');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident('1020');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident('1020');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident('1020');
	       ^
<sql-statement>
SELECT parse_ident('10.20');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident('10.20');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident('10.20');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident('10.20');
	       ^
<sql-statement>
SELECT parse_ident('.');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident('.');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident('.');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident('.');
	       ^
<sql-statement>
SELECT parse_ident('.1020');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident('.1020');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident('.1020');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident('.1020');
	       ^
<sql-statement>
SELECT parse_ident('xxx.1020');
</sql-statement>
-stdin-:<main>: Error: Type annotation

    -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
    	SELECT parse_ident('xxx.1020');
	^
        -stdin-:<main>:1:8: Error: At function: PgCall
        	SELECT parse_ident('xxx.1020');
	       ^
            -stdin-:<main>:1:8: Error: Unable to find an overload for proc parse_ident with given argument types: (unknown)
            	SELECT parse_ident('xxx.1020');
	       ^