@@ -53,38 +53,38 @@ SELECT c, count(*) FROM test_missing_target GROUP BY 1;
5353-- failure expected
5454SELECT c,count (* )FROM test_missing_targetGROUP BY 3 ;
5555
56- -- group w/o existing GROUP BY and ORDER BY target underambigious condition
56+ -- group w/o existing GROUP BY and ORDER BY target underambiguous condition
5757-- failure expected
5858SELECT count (* )FROM test_missing_target x, test_missing_target y
5959WHERE x .a = y .a
6060GROUP BY bORDER BY b;
6161
62- -- order w/ target underambigious condition
62+ -- order w/ target underambiguous condition
6363-- failure NOT expected
6464SELECT a, aFROM test_missing_target
6565ORDER BY a;
6666
67- -- order expression w/ target underambigious condition
67+ -- order expression w/ target underambiguous condition
6868-- failure NOT expected
6969SELECT a/ 2 , a/ 2 FROM test_missing_target
7070ORDER BY a/ 2 ;
7171
72- -- group expression w/ target underambigious condition
73- -- failure expected
72+ -- group expression w/ target underambiguous condition
73+ -- failureNOT expected
7474SELECT a/ 2 , a/ 2 FROM test_missing_target
7575GROUP BY a/ 2 ;
7676
77- -- group w/ existing GROUP BY target underambigious condition
77+ -- group w/ existing GROUP BY target underambiguous condition
7878SELECT x .b ,count (* )FROM test_missing_target x, test_missing_target y
7979WHERE x .a = y .a
8080GROUP BY x .b ;
8181
82- -- group w/o existing GROUP BY target underambigious condition
82+ -- group w/o existing GROUP BY target underambiguous condition
8383SELECT count (* )FROM test_missing_target x, test_missing_target y
8484WHERE x .a = y .a
8585GROUP BY x .b ;
8686
87- -- group w/o existing GROUP BY target underambigious condition
87+ -- group w/o existing GROUP BY target underambiguous condition
8888-- into a table
8989SELECT count (* ) INTO TABLE test_missing_target2
9090FROM test_missing_target x, test_missing_target y
@@ -96,12 +96,7 @@ SELECT * FROM test_missing_target2;
9696-- Functions and expressions
9797
9898-- w/ existing GROUP BY target
99- SELECT a%2 ,count (a)FROM test_missing_targetGROUP BY test_missing_target .a %2 ;
100- /*
101- NOTE: as of 1998-08-01 a bug was detected unrelated to this feature which
102- requires the aggragate function argument to be the same as some non-agragate
103- in the target list. (i.e. count(*) and count(b) crash the backend.)
104- */
99+ SELECT a%2 ,count (b)FROM test_missing_targetGROUP BY test_missing_target .a %2 ;
105100
106101-- w/o existing GROUP BY target using a relation name in GROUP BY clause
107102SELECT count (c)FROM test_missing_targetGROUP BY lower (test_missing_target .c );
@@ -124,23 +119,24 @@ SELECT a FROM test_missing_target ORDER BY upper(d);
124119SELECT count (b)FROM test_missing_target
125120GROUP BY (b+ 1 )/ 2 ORDER BY (b+ 1 )/ 2 desc ;
126121
127- -- group w/o existing GROUP BY and ORDER BY target underambigious condition
122+ -- group w/o existing GROUP BY and ORDER BY target underambiguous condition
128123-- failure expected
129124SELECT count (x .a )FROM test_missing_target x, test_missing_target y
130125WHERE x .a = y .a
131126GROUP BY b/ 2 ORDER BY b/ 2 ;
132127
133- -- group w/ existing GROUP BY target underambigious condition
128+ -- group w/ existing GROUP BY target underambiguous condition
134129SELECT x .b / 2 ,count (x .b )FROM test_missing_target x, test_missing_target y
135130WHERE x .a = y .a
136131GROUP BY x .b / 2 ;
137132
138- -- group w/o existing GROUP BY target under ambigious condition
133+ -- group w/o existing GROUP BY target under ambiguous condition
134+ -- failure expected due to ambiguous b in count(b)
139135SELECT count (b)FROM test_missing_target x, test_missing_target y
140136WHERE x .a = y .a
141137GROUP BY x .b / 2 ;
142138
143- -- group w/o existing GROUP BY target underambigious condition
139+ -- group w/o existing GROUP BY target underambiguous condition
144140-- into a table
145141SELECT count (x .b ) INTO TABLE test_missing_target3
146142FROM test_missing_target x, test_missing_target y