Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbce02f

Browse files
committed
Add ORDER BY clauses to some select-from-view operations
in rules regression test, in order to eliminate bogus test 'failures'that occur due to platform-dependent and join-implementation-dependentordering of tuples. I'm not sure that I got all of the SELECTs that needordering clauses --- we may need some more. But this takes care of thediffs between my platform and Jan's.
1 parent1ae6739 commitdbce02f

File tree

2 files changed

+49
-49
lines changed

2 files changed

+49
-49
lines changed

‎src/test/regress/expected/rules.out

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -340,69 +340,69 @@ QUERY: update rtest_emp set ename = 'wiecx' where ename = 'wiech';
340340
QUERY: update rtest_emp set ename = 'wieck', salary = '6000.00' where ename = 'wiecx';
341341
QUERY: update rtest_emp set salary = '7000.00' where ename = 'wieck';
342342
QUERY: delete from rtest_emp where ename = 'gates';
343-
QUERY: select ename, who = current_user as "matches user", action, newsal, oldsal from rtest_emplog;
343+
QUERY: select ename, who = current_user as "matches user", action, newsal, oldsal from rtest_emplog order by ename, action, newsal;
344344
ename |matches user|action |newsal |oldsal
345345
--------------------+------------+----------+----------+----------
346-
wiech |t |hired |$5,000.00 |$0.00
346+
gates |t |fired |$0.00|$80,000.00
347347
gates |t |hired |$80,000.00|$0.00
348+
wiech |t |hired |$5,000.00 |$0.00
348349
wieck |t |honored |$6,000.00 |$5,000.00
349350
wieck |t |honored |$7,000.00 |$6,000.00
350-
gates |t |fired |$0.00 |$80,000.00
351351
(5 rows)
352352

353353
QUERY: insert into rtest_empmass values ('meyer', '4000.00');
354354
QUERY: insert into rtest_empmass values ('maier', '5000.00');
355355
QUERY: insert into rtest_empmass values ('mayr', '6000.00');
356356
QUERY: insert into rtest_emp select * from rtest_empmass;
357-
QUERY: select ename, who = current_user as "matches user", action, newsal, oldsal from rtest_emplog;
357+
QUERY: select ename, who = current_user as "matches user", action, newsal, oldsal from rtest_emplog order by ename, action, newsal;
358358
ename |matches user|action |newsal |oldsal
359359
--------------------+------------+----------+----------+----------
360-
wiech |t |hired |$5,000.00 |$0.00
361-
gates |t |hired |$80,000.00|$0.00
362-
wieck |t |honored |$6,000.00 |$5,000.00
363-
wieck |t |honored |$7,000.00 |$6,000.00
364360
gates |t |fired |$0.00 |$80,000.00
365-
meyer |t |hired |$4,000.00|$0.00
361+
gates |t |hired |$80,000.00|$0.00
366362
maier |t |hired |$5,000.00 |$0.00
367363
mayr |t |hired |$6,000.00 |$0.00
364+
meyer |t |hired |$4,000.00 |$0.00
365+
wiech |t |hired |$5,000.00 |$0.00
366+
wieck |t |honored |$6,000.00 |$5,000.00
367+
wieck |t |honored |$7,000.00 |$6,000.00
368368
(8 rows)
369369

370370
QUERY: update rtest_empmass set salary = salary + '1000.00';
371371
QUERY: update rtest_emp set salary = rtest_empmass.salary where ename = rtest_empmass.ename;
372-
QUERY: select ename, who = current_user as "matches user", action, newsal, oldsal from rtest_emplog;
372+
QUERY: select ename, who = current_user as "matches user", action, newsal, oldsal from rtest_emplog order by ename, action, newsal;
373373
ename |matches user|action |newsal |oldsal
374374
--------------------+------------+----------+----------+----------
375-
wiech |t |hired |$5,000.00 |$0.00
376-
gates |t |hired |$80,000.00|$0.00
377-
wieck |t |honored |$6,000.00 |$5,000.00
378-
wieck |t |honored |$7,000.00 |$6,000.00
379375
gates |t |fired |$0.00 |$80,000.00
380-
meyer |t |hired |$4,000.00|$0.00
376+
gates |t |hired |$80,000.00|$0.00
381377
maier |t |hired |$5,000.00 |$0.00
382-
mayr |t |hired |$6,000.00 |$0.00
383378
maier |t |honored |$6,000.00 |$5,000.00
379+
mayr |t |hired |$6,000.00 |$0.00
384380
mayr |t |honored |$7,000.00 |$6,000.00
381+
meyer |t |hired |$4,000.00 |$0.00
385382
meyer |t |honored |$5,000.00 |$4,000.00
383+
wiech |t |hired |$5,000.00 |$0.00
384+
wieck |t |honored |$6,000.00 |$5,000.00
385+
wieck |t |honored |$7,000.00 |$6,000.00
386386
(11 rows)
387387

388388
QUERY: delete from rtest_emp where ename = rtest_empmass.ename;
389-
QUERY: select ename, who = current_user as "matches user", action, newsal, oldsal from rtest_emplog;
389+
QUERY: select ename, who = current_user as "matches user", action, newsal, oldsal from rtest_emplog order by ename, action, newsal;
390390
ename |matches user|action |newsal |oldsal
391391
--------------------+------------+----------+----------+----------
392-
wiech |t |hired |$5,000.00 |$0.00
393-
gates |t |hired |$80,000.00|$0.00
394-
wieck |t |honored |$6,000.00 |$5,000.00
395-
wieck |t |honored |$7,000.00 |$6,000.00
396392
gates |t |fired |$0.00 |$80,000.00
397-
meyer |t |hired |$4,000.00 |$0.00
393+
gates |t |hired |$80,000.00|$0.00
394+
maier |t |fired |$0.00 |$6,000.00
398395
maier |t |hired |$5,000.00 |$0.00
399-
mayr |t |hired |$6,000.00 |$0.00
400396
maier |t |honored |$6,000.00 |$5,000.00
401-
mayr |t |honored |$7,000.00 |$6,000.00
402-
meyer |t |honored |$5,000.00 |$4,000.00
403-
maier |t |fired |$0.00 |$6,000.00
404397
mayr |t |fired |$0.00 |$7,000.00
398+
mayr |t |hired |$6,000.00 |$0.00
399+
mayr |t |honored |$7,000.00 |$6,000.00
405400
meyer |t |fired |$0.00 |$5,000.00
401+
meyer |t |hired |$4,000.00 |$0.00
402+
meyer |t |honored |$5,000.00 |$4,000.00
403+
wiech |t |hired |$5,000.00 |$0.00
404+
wieck |t |honored |$6,000.00 |$5,000.00
405+
wieck |t |honored |$7,000.00 |$6,000.00
406406
(14 rows)
407407

408408
QUERY: insert into rtest_t4 values (1, 'Record should go to rtest_t4');
@@ -913,17 +913,17 @@ QUERY: INSERT INTO shoelace_data VALUES ('sl5', 4, 'brown', 1.0 , 'm');
913913
QUERY: INSERT INTO shoelace_data VALUES ('sl6', 0, 'brown', 0.9 , 'm');
914914
QUERY: INSERT INTO shoelace_data VALUES ('sl7', 7, 'brown', 60 , 'cm');
915915
QUERY: INSERT INTO shoelace_data VALUES ('sl8', 1, 'brown', 40 , 'inch');
916-
QUERY: SELECT * FROM shoelace;
916+
QUERY: SELECT * FROM shoelace ORDER BY sl_name;
917917
sl_name |sl_avail|sl_color |sl_len|sl_unit |sl_len_cm
918918
----------+--------+----------+------+--------+---------
919919
sl1 | 5|black | 80|cm | 80
920920
sl2 | 6|black | 100|cm | 100
921-
sl7 | 7|brown | 60|cm | 60
922921
sl3 | 0|black | 35|inch | 88.9
923922
sl4 | 8|black | 40|inch | 101.6
924-
sl8 | 1|brown | 40|inch | 101.6
925923
sl5 | 4|brown | 1|m | 100
926924
sl6 | 0|brown | 0.9|m | 90
925+
sl7 | 7|brown | 60|cm | 60
926+
sl8 | 1|brown | 40|inch | 101.6
927927
(8 rows)
928928

929929
QUERY: SELECT * FROM shoe_ready WHERE total_avail >= 2;
@@ -991,31 +991,31 @@ QUERY: CREATE RULE shoelace_ok_ins AS ON INSERT TO shoelace_ok
991991
QUERY: INSERT INTO shoelace_arrive VALUES ('sl3', 10);
992992
QUERY: INSERT INTO shoelace_arrive VALUES ('sl6', 20);
993993
QUERY: INSERT INTO shoelace_arrive VALUES ('sl8', 20);
994-
QUERY: SELECT * FROM shoelace;
994+
QUERY: SELECT * FROM shoelace ORDER BY sl_name;
995995
sl_name |sl_avail|sl_color |sl_len|sl_unit |sl_len_cm
996996
----------+--------+----------+------+--------+---------
997997
sl1 | 5|black | 80|cm | 80
998998
sl2 | 6|black | 100|cm | 100
999-
sl7 | 6|brown | 60|cm | 60
1000999
sl3 | 0|black | 35|inch | 88.9
10011000
sl4 | 8|black | 40|inch | 101.6
1002-
sl8 | 1|brown | 40|inch | 101.6
10031001
sl5 | 4|brown | 1|m | 100
10041002
sl6 | 0|brown | 0.9|m | 90
1003+
sl7 | 6|brown | 60|cm | 60
1004+
sl8 | 1|brown | 40|inch | 101.6
10051005
(8 rows)
10061006

10071007
QUERY: insert into shoelace_ok select * from shoelace_arrive;
1008-
QUERY: SELECT * FROM shoelace;
1008+
QUERY: SELECT * FROM shoelace ORDER BY sl_name;
10091009
sl_name |sl_avail|sl_color |sl_len|sl_unit |sl_len_cm
10101010
----------+--------+----------+------+--------+---------
10111011
sl1 | 5|black | 80|cm | 80
10121012
sl2 | 6|black | 100|cm | 100
1013-
sl7 | 6|brown | 60|cm | 60
1014-
sl4 | 8|black | 40|inch | 101.6
10151013
sl3 | 10|black | 35|inch | 88.9
1016-
sl8 |21|brown | 40|inch | 101.6
1014+
sl4 | 8|black | 40|inch | 101.6
10171015
sl5 | 4|brown | 1|m | 100
10181016
sl6 | 20|brown | 0.9|m | 90
1017+
sl7 | 6|brown | 60|cm | 60
1018+
sl8 | 21|brown | 40|inch | 101.6
10191019
(8 rows)
10201020

10211021
QUERY: SELECT * FROM shoelace_log;
@@ -1050,17 +1050,17 @@ sl9 | 0|pink | 35|inch | 88.9
10501050
QUERY: DELETE FROM shoelace WHERE EXISTS
10511051
(SELECT * FROM shoelace_candelete
10521052
WHERE sl_name = shoelace.sl_name);
1053-
QUERY: SELECT * FROM shoelace;
1053+
QUERY: SELECT * FROM shoelace ORDER BY sl_name;
10541054
sl_name |sl_avail|sl_color |sl_len|sl_unit |sl_len_cm
10551055
----------+--------+----------+------+--------+---------
10561056
sl1 | 5|black | 80|cm | 80
1057+
sl10 | 1000|magenta | 40|inch | 101.6
10571058
sl2 | 6|black | 100|cm | 100
1058-
sl7 | 6|brown | 60|cm | 60
1059-
sl4 | 8|black | 40|inch | 101.6
10601059
sl3 | 10|black | 35|inch | 88.9
1061-
sl8 | 21|brown | 40|inch | 101.6
1062-
sl10 | 1000|magenta | 40|inch | 101.6
1060+
sl4 | 8|black | 40|inch | 101.6
10631061
sl5 | 4|brown | 1|m | 100
10641062
sl6 | 20|brown | 0.9|m | 90
1063+
sl7 | 6|brown | 60|cm | 60
1064+
sl8 | 21|brown | 40|inch | 101.6
10651065
(9 rows)
10661066

‎src/test/regress/sql/rules.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,17 +272,17 @@ update rtest_emp set ename = 'wieck', salary = '6000.00' where ename = 'wiecx';
272272
update rtest_empset salary='7000.00'where ename='wieck';
273273
deletefrom rtest_empwhere ename='gates';
274274

275-
select ename, who=current_useras"matches user", action, newsal, oldsalfrom rtest_emplog;
275+
select ename, who=current_useras"matches user", action, newsal, oldsalfrom rtest_emplogorder by ename, action, newsal;
276276
insert into rtest_empmassvalues ('meyer','4000.00');
277277
insert into rtest_empmassvalues ('maier','5000.00');
278278
insert into rtest_empmassvalues ('mayr','6000.00');
279279
insert into rtest_empselect*from rtest_empmass;
280-
select ename, who=current_useras"matches user", action, newsal, oldsalfrom rtest_emplog;
280+
select ename, who=current_useras"matches user", action, newsal, oldsalfrom rtest_emplogorder by ename, action, newsal;
281281
update rtest_empmassset salary= salary+'1000.00';
282282
update rtest_empset salary=rtest_empmass.salarywhere ename=rtest_empmass.ename;
283-
select ename, who=current_useras"matches user", action, newsal, oldsalfrom rtest_emplog;
283+
select ename, who=current_useras"matches user", action, newsal, oldsalfrom rtest_emplogorder by ename, action, newsal;
284284
deletefrom rtest_empwhere ename=rtest_empmass.ename;
285-
select ename, who=current_useras"matches user", action, newsal, oldsalfrom rtest_emplog;
285+
select ename, who=current_useras"matches user", action, newsal, oldsalfrom rtest_emplogorder by ename, action, newsal;
286286

287287
--
288288
-- Multiple cascaded qualified instead rule test
@@ -584,7 +584,7 @@ INSERT INTO shoelace_data VALUES ('sl7', 7, 'brown', 60 , 'cm');
584584
INSERT INTO shoelace_dataVALUES ('sl8',1,'brown',40 ,'inch');
585585

586586
-- SELECTs in doc
587-
SELECT*FROM shoelace;
587+
SELECT*FROM shoelaceORDER BY sl_name;
588588
SELECT*FROM shoe_readyWHERE total_avail>=2;
589589

590590
CREATETABLEshoelace_log (
@@ -655,11 +655,11 @@ INSERT INTO shoelace_arrive VALUES ('sl3', 10);
655655
INSERT INTO shoelace_arriveVALUES ('sl6',20);
656656
INSERT INTO shoelace_arriveVALUES ('sl8',20);
657657

658-
SELECT*FROM shoelace;
658+
SELECT*FROM shoelaceORDER BY sl_name;
659659

660660
insert into shoelace_okselect*from shoelace_arrive;
661661

662-
SELECT*FROM shoelace;
662+
SELECT*FROM shoelaceORDER BY sl_name;
663663

664664
SELECT*FROM shoelace_log;
665665

@@ -680,4 +680,4 @@ DELETE FROM shoelace WHERE EXISTS
680680
(SELECT*FROM shoelace_candelete
681681
WHERE sl_name=shoelace.sl_name);
682682

683-
SELECT*FROM shoelace;
683+
SELECT*FROM shoelaceORDER BY sl_name;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp