aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/postgresql/cases/uuid.err
blob: 1e3d24f91aa637fc7236017a569f4a415ca1fbba (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
<sql-statement>
-- regression test for the uuid datatype
-- creating test tables
CREATE TABLE guid1
(
	guid_field UUID,
	text_field TEXT DEFAULT(now())
);
</sql-statement>
<sql-statement>
CREATE TABLE guid2
(
	guid_field UUID,
	text_field TEXT DEFAULT(now())
);
</sql-statement>
<sql-statement>
-- inserting invalid data tests
-- too long
INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111F');
</sql-statement>
-stdin-:<main>: Fatal: Execution

    -stdin-:<main>:1:1: Fatal: Execution of node: YtFill!
    	-- inserting invalid data tests
	^
        -stdin-:<main>:1:1: Fatal: ERROR:  invalid input syntax for type uuid: "11111111-1111-1111-1111-111111111111F"

        	-- inserting invalid data tests
	^
<sql-statement>
-- too short
INSERT INTO guid1(guid_field) VALUES('{11111111-1111-1111-1111-11111111111}');
</sql-statement>
-stdin-:<main>: Fatal: Execution

    -stdin-:<main>:1:1: Fatal: Execution of node: YtFill!
    	-- too short
	^
        -stdin-:<main>:1:1: Fatal: ERROR:  invalid input syntax for type uuid: "{11111111-1111-1111-1111-11111111111}"

        	-- too short
	^
<sql-statement>
-- valid data but invalid format
INSERT INTO guid1(guid_field) VALUES('111-11111-1111-1111-1111-111111111111');
</sql-statement>
-stdin-:<main>: Fatal: Execution

    -stdin-:<main>:1:1: Fatal: Execution of node: YtFill!
    	-- valid data but invalid format
	^
        -stdin-:<main>:1:1: Fatal: ERROR:  invalid input syntax for type uuid: "111-11111-1111-1111-1111-111111111111"

        	-- valid data but invalid format
	^
<sql-statement>
INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-2222-222222222222 ');
</sql-statement>
-stdin-:<main>: Fatal: Execution

    -stdin-:<main>:1:1: Fatal: Execution of node: YtFill!
    	INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-2222-222222222222 ');
	^
        -stdin-:<main>:1:1: Fatal: ERROR:  invalid input syntax for type uuid: "{22222222-2222-2222-2222-222222222222 "

        	INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-2222-222222222222 ');
	^
<sql-statement>
-- invalid data
INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-G111-111111111111');
</sql-statement>
-stdin-:<main>: Fatal: Execution

    -stdin-:<main>:1:1: Fatal: Execution of node: YtFill!
    	-- invalid data
	^
        -stdin-:<main>:1:1: Fatal: ERROR:  invalid input syntax for type uuid: "11111111-1111-1111-G111-111111111111"

        	-- invalid data
	^
<sql-statement>
INSERT INTO guid1(guid_field) VALUES('11+11111-1111-1111-1111-111111111111');
</sql-statement>
-stdin-:<main>: Fatal: Execution

    -stdin-:<main>:1:1: Fatal: Execution of node: YtFill!
    	INSERT INTO guid1(guid_field) VALUES('11+11111-1111-1111-1111-111111111111');
	^
        -stdin-:<main>:1:1: Fatal: ERROR:  invalid input syntax for type uuid: "11+11111-1111-1111-1111-111111111111"

        	INSERT INTO guid1(guid_field) VALUES('11+11111-1111-1111-1111-111111111111');
	^
<sql-statement>
--inserting three input formats
INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111');
</sql-statement>
<sql-statement>
INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-2222-222222222222}');
</sql-statement>
<sql-statement>
INSERT INTO guid1(guid_field) VALUES('3f3e3c3b3a3039383736353433a2313e');
</sql-statement>
<sql-statement>
-- retrieving the inserted data
SELECT guid_field FROM guid1;
</sql-statement>
<sql-statement>
-- ordering test
SELECT guid_field FROM guid1 ORDER BY guid_field ASC;
</sql-statement>
<sql-statement>
SELECT guid_field FROM guid1 ORDER BY guid_field DESC;
</sql-statement>
<sql-statement>
-- = operator test
SELECT COUNT(*) FROM guid1 WHERE guid_field = '3f3e3c3b-3a30-3938-3736-353433a2313e';
</sql-statement>
<sql-statement>
-- <> operator test
SELECT COUNT(*) FROM guid1 WHERE guid_field <> '11111111111111111111111111111111';
</sql-statement>
<sql-statement>
-- < operator test
SELECT COUNT(*) FROM guid1 WHERE guid_field < '22222222-2222-2222-2222-222222222222';
</sql-statement>
<sql-statement>
-- <= operator test
SELECT COUNT(*) FROM guid1 WHERE guid_field <= '22222222-2222-2222-2222-222222222222';
</sql-statement>
<sql-statement>
-- > operator test
SELECT COUNT(*) FROM guid1 WHERE guid_field > '22222222-2222-2222-2222-222222222222';
</sql-statement>
<sql-statement>
-- >= operator test
SELECT COUNT(*) FROM guid1 WHERE guid_field >= '22222222-2222-2222-2222-222222222222';
</sql-statement>
<sql-statement>
-- btree and hash index creation test
CREATE INDEX guid1_btree ON guid1 USING BTREE (guid_field);
</sql-statement>
<sql-statement>
CREATE INDEX guid1_hash  ON guid1 USING HASH  (guid_field);
</sql-statement>
<sql-statement>
-- unique index test
CREATE UNIQUE INDEX guid1_unique_BTREE ON guid1 USING BTREE (guid_field);
</sql-statement>
-stdin-:<main>: Error: Parse Sql

    -stdin-:<main>:1:1: Error: unique index creation is not supported yet
    	-- unique index test
	^
<sql-statement>
-- should fail
INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111');
</sql-statement>
<sql-statement>
-- check to see whether the new indexes are actually there
SELECT count(*) FROM pg_class WHERE relkind='i' AND relname LIKE 'guid%';
</sql-statement>
<sql-statement>
-- populating the test tables with additional records
INSERT INTO guid1(guid_field) VALUES('44444444-4444-4444-4444-444444444444');
</sql-statement>
<sql-statement>
INSERT INTO guid2(guid_field) VALUES('11111111-1111-1111-1111-111111111111');
</sql-statement>
<sql-statement>
INSERT INTO guid2(guid_field) VALUES('{22222222-2222-2222-2222-222222222222}');
</sql-statement>
<sql-statement>
INSERT INTO guid2(guid_field) VALUES('3f3e3c3b3a3039383736353433a2313e');
</sql-statement>
<sql-statement>
-- join test
SELECT COUNT(*) FROM guid1 g1 INNER JOIN guid2 g2 ON g1.guid_field = g2.guid_field;
</sql-statement>
<sql-statement>
SELECT COUNT(*) FROM guid1 g1 LEFT JOIN guid2 g2 ON g1.guid_field = g2.guid_field WHERE g2.guid_field IS NULL;
</sql-statement>
<sql-statement>
-- generation test
TRUNCATE guid1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql

    -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
    	-- generation test
	^
<sql-statement>
INSERT INTO guid1 (guid_field) VALUES (gen_random_uuid());
</sql-statement>
<sql-statement>
INSERT INTO guid1 (guid_field) VALUES (gen_random_uuid());
</sql-statement>
<sql-statement>
SELECT count(DISTINCT guid_field) FROM guid1;
</sql-statement>
<sql-statement>
-- clean up
DROP TABLE guid1, guid2 CASCADE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql

    -stdin-:<main>:1:1: Error: CASCADE is not implemented
    	-- clean up
	^