Skip to content

Commit c06d6aa

Browse files
committed
Clean up ancient test style
Many older tests where written in a style like SELECT '' AS two, i.* FROM INT2_TBL where the first column indicated the number of expected result rows. This has gotten increasingly out of date, as the test data fixtures have expanded, so a lot of these were wrong and misleading. Moreover, this style isn't really necessary, since the psql output already shows the number of result rows. To clean this up, remove all those extra columns. Discussion: https://www.postgresql.org/message-id/flat/1a25312b-2686-380d-3c67-7a69094a999f%40enterprisedb.com
1 parent b3817f5 commit c06d6aa

Some content is hidden

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

61 files changed

+9257
-9257
lines changed

src/test/regress/expected/boolean.out

Lines changed: 128 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -226,48 +226,48 @@ INSERT INTO BOOLTBL1 (f1) VALUES (bool 't');
226226
INSERT INTO BOOLTBL1 (f1) VALUES (bool 'True');
227227
INSERT INTO BOOLTBL1 (f1) VALUES (bool 'true');
228228
-- BOOLTBL1 should be full of true's at this point
229-
SELECT '' AS t_3, BOOLTBL1.* FROM BOOLTBL1;
230-
t_3 | f1
231-
-----+----
232-
| t
233-
| t
234-
| t
229+
SELECT BOOLTBL1.* FROM BOOLTBL1;
230+
f1
231+
----
232+
t
233+
t
234+
t
235235
(3 rows)
236236

237-
SELECT '' AS t_3, BOOLTBL1.*
237+
SELECT BOOLTBL1.*
238238
FROM BOOLTBL1
239239
WHERE f1 = bool 'true';
240-
t_3 | f1
241-
-----+----
242-
| t
243-
| t
244-
| t
240+
f1
241+
----
242+
t
243+
t
244+
t
245245
(3 rows)
246246

247-
SELECT '' AS t_3, BOOLTBL1.*
247+
SELECT BOOLTBL1.*
248248
FROM BOOLTBL1
249249
WHERE f1 <> bool 'false';
250-
t_3 | f1
251-
-----+----
252-
| t
253-
| t
254-
| t
250+
f1
251+
----
252+
t
253+
t
254+
t
255255
(3 rows)
256256

257-
SELECT '' AS zero, BOOLTBL1.*
257+
SELECT BOOLTBL1.*
258258
FROM BOOLTBL1
259259
WHERE booleq(bool 'false', f1);
260-
zero | f1
261-
------+----
260+
f1
261+
----
262262
(0 rows)
263263

264264
INSERT INTO BOOLTBL1 (f1) VALUES (bool 'f');
265-
SELECT '' AS f_1, BOOLTBL1.*
265+
SELECT BOOLTBL1.*
266266
FROM BOOLTBL1
267267
WHERE f1 = bool 'false';
268-
f_1 | f1
269-
-----+----
270-
| f
268+
f1
269+
----
270+
f
271271
(1 row)
272272

273273
CREATE TABLE BOOLTBL2 (f1 bool);
@@ -283,163 +283,163 @@ ERROR: invalid input syntax for type boolean: "XXX"
283283
LINE 2: VALUES (bool 'XXX');
284284
^
285285
-- BOOLTBL2 should be full of false's at this point
286-
SELECT '' AS f_4, BOOLTBL2.* FROM BOOLTBL2;
287-
f_4 | f1
288-
-----+----
289-
| f
290-
| f
291-
| f
292-
| f
286+
SELECT BOOLTBL2.* FROM BOOLTBL2;
287+
f1
288+
----
289+
f
290+
f
291+
f
292+
f
293293
(4 rows)
294294

295-
SELECT '' AS tf_12, BOOLTBL1.*, BOOLTBL2.*
295+
SELECT BOOLTBL1.*, BOOLTBL2.*
296296
FROM BOOLTBL1, BOOLTBL2
297297
WHERE BOOLTBL2.f1 <> BOOLTBL1.f1;
298-
tf_12 | f1 | f1
299-
-------+----+----
300-
| t | f
301-
| t | f
302-
| t | f
303-
| t | f
304-
| t | f
305-
| t | f
306-
| t | f
307-
| t | f
308-
| t | f
309-
| t | f
310-
| t | f
311-
| t | f
298+
f1 | f1
299+
----+----
300+
t | f
301+
t | f
302+
t | f
303+
t | f
304+
t | f
305+
t | f
306+
t | f
307+
t | f
308+
t | f
309+
t | f
310+
t | f
311+
t | f
312312
(12 rows)
313313

314-
SELECT '' AS tf_12, BOOLTBL1.*, BOOLTBL2.*
314+
SELECT BOOLTBL1.*, BOOLTBL2.*
315315
FROM BOOLTBL1, BOOLTBL2
316316
WHERE boolne(BOOLTBL2.f1,BOOLTBL1.f1);
317-
tf_12 | f1 | f1
318-
-------+----+----
319-
| t | f
320-
| t | f
321-
| t | f
322-
| t | f
323-
| t | f
324-
| t | f
325-
| t | f
326-
| t | f
327-
| t | f
328-
| t | f
329-
| t | f
330-
| t | f
317+
f1 | f1
318+
----+----
319+
t | f
320+
t | f
321+
t | f
322+
t | f
323+
t | f
324+
t | f
325+
t | f
326+
t | f
327+
t | f
328+
t | f
329+
t | f
330+
t | f
331331
(12 rows)
332332

333-
SELECT '' AS ff_4, BOOLTBL1.*, BOOLTBL2.*
333+
SELECT BOOLTBL1.*, BOOLTBL2.*
334334
FROM BOOLTBL1, BOOLTBL2
335335
WHERE BOOLTBL2.f1 = BOOLTBL1.f1 and BOOLTBL1.f1 = bool 'false';
336-
ff_4 | f1 | f1
337-
------+----+----
338-
| f | f
339-
| f | f
340-
| f | f
341-
| f | f
336+
f1 | f1
337+
----+----
338+
f | f
339+
f | f
340+
f | f
341+
f | f
342342
(4 rows)
343343

344-
SELECT '' AS tf_12_ff_4, BOOLTBL1.*, BOOLTBL2.*
344+
SELECT BOOLTBL1.*, BOOLTBL2.*
345345
FROM BOOLTBL1, BOOLTBL2
346346
WHERE BOOLTBL2.f1 = BOOLTBL1.f1 or BOOLTBL1.f1 = bool 'true'
347347
ORDER BY BOOLTBL1.f1, BOOLTBL2.f1;
348-
tf_12_ff_4 | f1 | f1
349-
------------+----+----
350-
| f | f
351-
| f | f
352-
| f | f
353-
| f | f
354-
| t | f
355-
| t | f
356-
| t | f
357-
| t | f
358-
| t | f
359-
| t | f
360-
| t | f
361-
| t | f
362-
| t | f
363-
| t | f
364-
| t | f
365-
| t | f
348+
f1 | f1
349+
----+----
350+
f | f
351+
f | f
352+
f | f
353+
f | f
354+
t | f
355+
t | f
356+
t | f
357+
t | f
358+
t | f
359+
t | f
360+
t | f
361+
t | f
362+
t | f
363+
t | f
364+
t | f
365+
t | f
366366
(16 rows)
367367

368368
--
369369
-- SQL syntax
370370
-- Try all combinations to ensure that we get nothing when we expect nothing
371371
-- - thomas 2000-01-04
372372
--
373-
SELECT '' AS "True", f1
373+
SELECT f1
374374
FROM BOOLTBL1
375375
WHERE f1 IS TRUE;
376-
True | f1
377-
------+----
378-
| t
379-
| t
380-
| t
376+
f1
377+
----
378+
t
379+
t
380+
t
381381
(3 rows)
382382

383-
SELECT '' AS "Not False", f1
383+
SELECT f1
384384
FROM BOOLTBL1
385385
WHERE f1 IS NOT FALSE;
386-
Not False | f1
387-
-----------+----
388-
| t
389-
| t
390-
| t
386+
f1
387+
----
388+
t
389+
t
390+
t
391391
(3 rows)
392392

393-
SELECT '' AS "False", f1
393+
SELECT f1
394394
FROM BOOLTBL1
395395
WHERE f1 IS FALSE;
396-
False | f1
397-
-------+----
398-
| f
396+
f1
397+
----
398+
f
399399
(1 row)
400400

401-
SELECT '' AS "Not True", f1
401+
SELECT f1
402402
FROM BOOLTBL1
403403
WHERE f1 IS NOT TRUE;
404-
Not True | f1
405-
----------+----
406-
| f
404+
f1
405+
----
406+
f
407407
(1 row)
408408

409-
SELECT '' AS "True", f1
409+
SELECT f1
410410
FROM BOOLTBL2
411411
WHERE f1 IS TRUE;
412-
True | f1
413-
------+----
412+
f1
413+
----
414414
(0 rows)
415415

416-
SELECT '' AS "Not False", f1
416+
SELECT f1
417417
FROM BOOLTBL2
418418
WHERE f1 IS NOT FALSE;
419-
Not False | f1
420-
-----------+----
419+
f1
420+
----
421421
(0 rows)
422422

423-
SELECT '' AS "False", f1
423+
SELECT f1
424424
FROM BOOLTBL2
425425
WHERE f1 IS FALSE;
426-
False | f1
427-
-------+----
428-
| f
429-
| f
430-
| f
431-
| f
426+
f1
427+
----
428+
f
429+
f
430+
f
431+
f
432432
(4 rows)
433433

434-
SELECT '' AS "Not True", f1
434+
SELECT f1
435435
FROM BOOLTBL2
436436
WHERE f1 IS NOT TRUE;
437-
Not True | f1
438-
----------+----
439-
| f
440-
| f
441-
| f
442-
| f
437+
f1
438+
----
439+
f
440+
f
441+
f
442+
f
443443
(4 rows)
444444

445445
--

0 commit comments

Comments
 (0)