Accept errors in tidscan regression test
authorPavan Deolasee <[email protected]>
Fri, 25 Aug 2017 05:56:38 +0000 (11:26 +0530)
committerPavan Deolasee <[email protected]>
Fri, 25 Aug 2017 06:09:22 +0000 (11:39 +0530)
We don't support BACKWARD scan of RemoteSubplan and neither support WHERE
CURRENT OF. So accept errors arising out of these limitations. These test case
changes are new in XL10 and hence we did not see these failures in the earlier
releases of XL.

src/test/regress/expected/tidscan.out
src/test/regress/sql/tidscan.sql

index bd1fae084a09820d07fa6ed6919964b1094bfb2a..3355409f8a9b92e5e5edc365600908b50ad520fa 100644 (file)
@@ -118,18 +118,13 @@ FETCH ALL FROM c;
  (0,1) |  3
 (3 rows)
 
+-- XL does not support BACKWARD scan of RemoteSubplan/RemoteSubquery and
+-- hence the next statement fails
 FETCH BACKWARD 1 FROM c;
- ctid  | id 
--------+----
- (0,2) |  2
-(1 row)
-
+ERROR:  cursor can only scan forward
+HINT:  Declare it with SCROLL option to enable backward scan.
 FETCH FIRST FROM c;
- ctid  | id 
--------+----
- (0,1) |  1
-(1 row)
-
+ERROR:  current transaction is aborted, commands ignored until end of transaction block
 ROLLBACK;
 -- tidscan via CURRENT OF
 BEGIN;
@@ -148,47 +143,24 @@ FETCH NEXT FROM c;
 
 -- perform update
 EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
+-- XL does not support WHERE CURRENT OF and hence the next
+-- statement fails
 UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *;
-                    QUERY PLAN                     
----------------------------------------------------
- Update on tidscan (actual rows=1 loops=1)
-   ->  Tid Scan on tidscan (actual rows=1 loops=1)
-         TID Cond: CURRENT OF c
-(3 rows)
-
+ERROR:  WHERE CURRENT OF clause not yet supported
 FETCH NEXT FROM c;
- ctid  | id 
--------+----
- (0,3) |  3
-(1 row)
-
+ERROR:  current transaction is aborted, commands ignored until end of transaction block
 -- perform update
 EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
 UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *;
-                    QUERY PLAN                     
----------------------------------------------------
- Update on tidscan (actual rows=1 loops=1)
-   ->  Tid Scan on tidscan (actual rows=1 loops=1)
-         TID Cond: CURRENT OF c
-(3 rows)
-
+ERROR:  current transaction is aborted, commands ignored until end of transaction block
 SELECT * FROM tidscan;
- id 
-----
-  1
- -2
- -3
-(3 rows)
-
+ERROR:  current transaction is aborted, commands ignored until end of transaction block
 -- position cursor past any rows
 FETCH NEXT FROM c;
- ctid | id 
-------+----
-(0 rows)
-
+ERROR:  current transaction is aborted, commands ignored until end of transaction block
 -- should error out
 EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
 UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *;
-ERROR:  cursor "c" is not positioned on a row
+ERROR:  current transaction is aborted, commands ignored until end of transaction block
 ROLLBACK;
 DROP TABLE tidscan;
index c9d632e49d821c05d5594e217c8541a78c45fb00..16acf2819eb8be140632241133f467bcf195f8b0 100644 (file)
@@ -41,6 +41,8 @@ BEGIN;
 DECLARE c CURSOR FOR
 SELECT ctid, * FROM tidscan WHERE ctid = ANY(ARRAY['(0,1)', '(0,2)']::tid[]);
 FETCH ALL FROM c;
+-- XL does not support BACKWARD scan of RemoteSubplan/RemoteSubquery and
+-- hence the next statement fails
 FETCH BACKWARD 1 FROM c;
 FETCH FIRST FROM c;
 ROLLBACK;
@@ -52,6 +54,8 @@ FETCH NEXT FROM c; -- skip one row
 FETCH NEXT FROM c;
 -- perform update
 EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
+-- XL does not support WHERE CURRENT OF and hence the next
+-- statement fails
 UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *;
 FETCH NEXT FROM c;
 -- perform update