Make `wildspeed` a modern Postgres extension.
[wildspeed.git] / expected / wildspeed.out
1 --
2 -- first, define the datatype.  Turn off echoing so that expected file
3 -- does not depend on `CREATE EXTENSION wildspeed` output.
4 --
5 SET client_min_messages = warning;
6 \set ECHO none
7 RESET client_min_messages;
8 SELECT permute('');
9  permute 
10 ---------
11  {$}
12 (1 row)
13
14 SELECT permute('0');
15  permute 
16 ---------
17  {0$}
18 (1 row)
19
20 SELECT permute('01');
21   permute  
22 -----------
23  {01$,1$0}
24 (1 row)
25
26 SELECT permute('hello');
27                permute                
28 --------------------------------------
29  {hello$,ello$h,llo$he,lo$hel,o$hell}
30 (1 row)
31
32 CREATE TABLE testlike ( t text );
33 \copy testlike from 'data/testlike.data'
34 INSERT INTO testlike VALUES ('');
35 SELECT * FROM testlike WHERE t LIKE '' ORDER BY t;
36  t 
37 ---
38  
39 (1 row)
40
41 SELECT * FROM testlike WHERE t LIKE '%' ORDER BY t;
42    t   
43 -------
44  
45  hekko
46  helko
47  hella
48  hello
49  hillo
50  jeeeh
51  jelko
52  jella
53  jello
54 (10 rows)
55
56 SELECT * FROM testlike WHERE t LIKE 'hello' ORDER BY t;
57    t   
58 -------
59  hello
60 (1 row)
61
62 SELECT * FROM testlike WHERE t LIKE 'hello%' ORDER BY t;
63    t   
64 -------
65  hello
66 (1 row)
67
68 SELECT * FROM testlike WHERE t LIKE 'hel%' ORDER BY t;
69    t   
70 -------
71  helko
72  hella
73  hello
74 (3 rows)
75
76 SELECT * FROM testlike WHERE t LIKE '%hello' ORDER BY t;
77    t   
78 -------
79  hello
80 (1 row)
81
82 SELECT * FROM testlike WHERE t LIKE '%lo' ORDER BY t;
83    t   
84 -------
85  hello
86  hillo
87  jello
88 (3 rows)
89
90 SELECT * FROM testlike WHERE t LIKE '%hello%' ORDER BY t;
91    t   
92 -------
93  hello
94 (1 row)
95
96 SELECT * FROM testlike WHERE t LIKE '%ll%' ORDER BY t;
97    t   
98 -------
99  hella
100  hello
101  hillo
102  jella
103  jello
104 (5 rows)
105
106 SELECT * FROM testlike WHERE t LIKE 'h%o' ORDER BY t;
107    t   
108 -------
109  hekko
110  helko
111  hello
112  hillo
113 (4 rows)
114
115 SELECT * FROM testlike WHERE t LIKE 'h%l%o' ORDER BY t;
116    t   
117 -------
118  helko
119  hello
120  hillo
121 (3 rows)
122
123 SELECT * FROM testlike WHERE t LIKE 'h%l%o' ORDER BY t;
124    t   
125 -------
126  helko
127  hello
128  hillo
129 (3 rows)
130
131 SELECT * FROM testlike WHERE t LIKE 'h%e%l%o' ORDER BY t;
132    t   
133 -------
134  helko
135  hello
136 (2 rows)
137
138 SELECT * FROM testlike WHERE t LIKE '%e%l%' ORDER BY t;
139    t   
140 -------
141  helko
142  hella
143  hello
144  jelko
145  jella
146  jello
147 (6 rows)
148
149 SELECT * FROM testlike WHERE t LIKE '%e%o' ORDER BY t;
150    t   
151 -------
152  hekko
153  helko
154  hello
155  jelko
156  jello
157 (5 rows)
158
159 SELECT * FROM testlike WHERE t LIKE 'h%o%' ORDER BY t;
160    t   
161 -------
162  hekko
163  helko
164  hello
165  hillo
166 (4 rows)
167
168 SELECT * FROM testlike WHERE t LIKE 'j%e%' ORDER BY t;
169    t   
170 -------
171  jeeeh
172  jelko
173  jella
174  jello
175 (4 rows)
176
177 SELECT * FROM testlike WHERE t LIKE 'j%k%' ORDER BY t;
178    t   
179 -------
180  jelko
181 (1 row)
182
183 SELECT * FROM testlike WHERE t LIKE 'h%k%' ORDER BY t;
184    t   
185 -------
186  hekko
187  helko
188 (2 rows)
189
190 CREATE INDEX like_idx ON testlike USING gin ( t wildcard_ops );
191 SET enable_seqscan=off;
192 SELECT * FROM testlike WHERE t LIKE '' ORDER BY t;
193  t 
194 ---
195  
196 (1 row)
197
198 SELECT * FROM testlike WHERE t LIKE '%' ORDER BY t;
199    t   
200 -------
201  
202  hekko
203  helko
204  hella
205  hello
206  hillo
207  jeeeh
208  jelko
209  jella
210  jello
211 (10 rows)
212
213 SELECT * FROM testlike WHERE t LIKE 'hello' ORDER BY t;
214    t   
215 -------
216  hello
217 (1 row)
218
219 SELECT * FROM testlike WHERE t LIKE 'hello%' ORDER BY t;
220    t   
221 -------
222  hello
223 (1 row)
224
225 SELECT * FROM testlike WHERE t LIKE 'hel%' ORDER BY t;
226    t   
227 -------
228  helko
229  hella
230  hello
231 (3 rows)
232
233 SELECT * FROM testlike WHERE t LIKE '%hello' ORDER BY t;
234    t   
235 -------
236  hello
237 (1 row)
238
239 SELECT * FROM testlike WHERE t LIKE '%lo' ORDER BY t;
240    t   
241 -------
242  hello
243  hillo
244  jello
245 (3 rows)
246
247 SELECT * FROM testlike WHERE t LIKE '%hello%' ORDER BY t;
248    t   
249 -------
250  hello
251 (1 row)
252
253 SELECT * FROM testlike WHERE t LIKE '%ll%' ORDER BY t;
254    t   
255 -------
256  hella
257  hello
258  hillo
259  jella
260  jello
261 (5 rows)
262
263 SELECT * FROM testlike WHERE t LIKE 'h%o' ORDER BY t;
264    t   
265 -------
266  hekko
267  helko
268  hello
269  hillo
270 (4 rows)
271
272 SELECT * FROM testlike WHERE t LIKE 'h%l%o' ORDER BY t;
273    t   
274 -------
275  helko
276  hello
277  hillo
278 (3 rows)
279
280 SELECT * FROM testlike WHERE t LIKE 'h%l%o' ORDER BY t;
281    t   
282 -------
283  helko
284  hello
285  hillo
286 (3 rows)
287
288 SELECT * FROM testlike WHERE t LIKE 'h%e%l%o' ORDER BY t;
289    t   
290 -------
291  helko
292  hello
293 (2 rows)
294
295 SELECT * FROM testlike WHERE t LIKE '%e%l%' ORDER BY t;
296    t   
297 -------
298  helko
299  hella
300  hello
301  jelko
302  jella
303  jello
304 (6 rows)
305
306 SELECT * FROM testlike WHERE t LIKE '%e%o' ORDER BY t;
307    t   
308 -------
309  hekko
310  helko
311  hello
312  jelko
313  jello
314 (5 rows)
315
316 SELECT * FROM testlike WHERE t LIKE 'h%o%' ORDER BY t;
317    t   
318 -------
319  hekko
320  helko
321  hello
322  hillo
323 (4 rows)
324
325 SELECT * FROM testlike WHERE t LIKE 'j%e%' ORDER BY t;
326    t   
327 -------
328  jeeeh
329  jelko
330  jella
331  jello
332 (4 rows)
333
334 SELECT * FROM testlike WHERE t LIKE 'j%k%' ORDER BY t;
335    t   
336 -------
337  jelko
338 (1 row)
339
340 SELECT * FROM testlike WHERE t LIKE 'h%k%' ORDER BY t;
341    t   
342 -------
343  hekko
344  helko
345 (2 rows)
346