Separate out INSENSITIVE cursor Issue ( #34)
authorPallavi Sontakke <pallavi.sontakke@2ndQuadrant.com>
Thu, 16 Jun 2016 12:12:03 +0000 (17:42 +0530)
committerPallavi Sontakke <pallavi.sontakke@2ndQuadrant.com>
Thu, 16 Jun 2016 12:12:03 +0000 (17:42 +0530)
Move issue in xl_known_bugs to track it separately.

src/test/regress/expected/xl_known_bugs.out
src/test/regress/expected/xl_limitations.out
src/test/regress/sql/xl_known_bugs.sql
src/test/regress/sql/xl_limitations.sql

index cfef50f9697d613959c4e1d05e2341c972abd2a4..bd210881a20f9f753cdb7173c6fc8396518d7320 100644 (file)
@@ -714,3 +714,40 @@ select pct, count(unique1) from
 (1 row)
 
 ------------------------------------------
+-- Issue #34 - Insensitive cursors
+-- insensitive cursor would be insensitive to updates happening to the table
+-- right now it is sensitive which is a bug (34) in Postgres-XL issue tracker sheet.
+create table xl_PLine (
+    slotname   char(20),
+    phonenumber        char(20),
+    comment    text,
+    backlink   char(20)
+);
+create unique index xl_PLine_n on xl_PLine using btree (slotname bpchar_ops);
+insert into  xl_PLine values ('PL.029', '-502', 'Fax first floor', 'PS.first.ta1');
+insert into  xl_PLine values ('PL.030', '-367', '', 'PS.first.tb6');
+BEGIN;
+declare xl_ins_cur INSENSITIVE CURSOR for select * from xl_Pline order by slotname desc;
+FETCH FIRST xl_ins_cur;
+       slotname       |     phonenumber      | comment |       backlink       
+----------------------+----------------------+---------+----------------------
+ PL.030               | -367                 |         | PS.first.tb6        
+(1 row)
+
+delete from xl_Pline where slotname in ('PL.030');
+FETCH FIRST xl_ins_cur;
+       slotname       |     phonenumber      |     comment     |       backlink       
+----------------------+----------------------+-----------------+----------------------
+ PL.030               | -367                 |         | PS.first.tb6        
+(1 row)
+
+delete from xl_Pline where slotname in ('PL.029');
+FETCH FIRST xl_ins_cur;
+ slotname | phonenumber | comment | backlink 
+----------+-------------+---------+----------
+ PL.030               | -367                 |         | PS.first.tb6        
+(1 row)
+
+COMMIT;
+drop table xl_PLine;
+------------------------------------------
index 3f086c006c2dd539eed529566cc6854153eae68b..1a5072c8b88453c3172f2935f97c3b2b44ab9991 100755 (executable)
@@ -429,87 +429,6 @@ FETCH BACKWARD 2 xl_scroll_cursor1;
 DELETE FROM xl_Pline WHERE CURRENT OF xl_scroll_cursor1;
 ERROR:  WHERE CURRENT OF clause not yet supported
 COMMIT;
---insensitive cursor would be insensitive to updates happening to the table
--- right now it is sensitive which is a bug (34) in Postgres-XL issue tracker sheet. 
-BEGIN;
-declare xl_ins_cursor INSENSITIVE CURSOR for select * from xl_Pline order by slotname desc;
-FETCH FIRST xl_ins_cursor;
-       slotname       |     phonenumber      |     comment     |       backlink       
-----------------------+----------------------+-----------------+----------------------
- PL.029               | -502                 | Fax first floor | PS.first.ta1        
-(1 row)
-
-FETCH ABSOLUTE 5 xl_ins_cursor;
-       slotname       |     phonenumber      | comment |       backlink       
-----------------------+----------------------+---------+----------------------
- PL.025               | -367                 |         | PS.first.tb6        
-(1 row)
-
-update xl_Pline set phonenumber='-503' where slotname = 'PL.029';
-insert into  xl_PLine values ('PL.030', '-367', '', 'PS.first.tb6');
-FETCH FIRST xl_ins_cursor;
-       slotname       |     phonenumber      | comment |       backlink       
-----------------------+----------------------+---------+----------------------
- PL.030               | -367                 |         | PS.first.tb6        
-(1 row)
-
-select xl_nodename_from_id(xc_node_id), * from xl_Pline where slotname in ('PL.030', 'PL.029') order by slotname;
- xl_nodename_from_id |       slotname       |     phonenumber      |     comment     |       backlink       
----------------------+----------------------+----------------------+-----------------+----------------------
- datanode_1          | PL.029               | -503                 | Fax first floor | PS.first.ta1        
- datanode_1          | PL.030               | -367                 |                 | PS.first.tb6        
-(2 rows)
-
-delete from xl_Pline where slotname in ('PL.030');
-FETCH FIRST xl_ins_cursor;
-       slotname       |     phonenumber      |     comment     |       backlink       
-----------------------+----------------------+-----------------+----------------------
- PL.029               | -503                 | Fax first floor | PS.first.ta1        
-(1 row)
-
-delete from xl_Pline where slotname in ('PL.029');
-FETCH FIRST xl_ins_cursor;
-       slotname       |     phonenumber      |   comment    |       backlink       
-----------------------+----------------------+--------------+----------------------
- PL.028               | -501                 | Fax entrance | PS.base.ta2         
-(1 row)
-
-insert into  xl_PLine values ('PL.029', '-367', '', 'PS.first.tb6');
-FETCH ALL FROM xl_ins_cursor;
-       slotname       |     phonenumber      |   comment    |       backlink       
-----------------------+----------------------+--------------+----------------------
- PL.027               | -367                 |              | PS.first.tb6        
- PL.026               | -367                 |              | PS.first.tb6        
- PL.025               | -367                 |              | PS.first.tb6        
- PL.024               | -367                 |              | PS.first.tb6        
- PL.023               | -367                 |              | PS.first.tb6        
- PL.022               | -367                 |              | PS.first.tb6        
- PL.021               | -365                 |              | PS.first.tb5        
- PL.020               | -364                 |              | PS.first.tb3        
- PL.019               | -363                 |              | PS.first.tb2        
- PL.018               | -362                 |              | PS.first.tb1        
- PL.017               | -139                 |              | PS.first.ta4        
- PL.016               | -137                 |              | PS.first.ta3        
- PL.015               | -134                 |              | PS.first.ta1        
- PL.014               | -122                 |              | PS.base.tb6         
- PL.013               | -122                 |              | PS.base.tb6         
- PL.012               | -122                 |              | PS.base.tb6         
- PL.011               | -122                 |              | PS.base.tb6         
- PL.010               | -122                 |              | PS.base.tb6         
- PL.009               | -121                 |              | PS.base.tb5         
- PL.008               | -109                 |              | PS.base.tb4         
- PL.007               | -108                 |              | PS.base.tb3         
- PL.006               | -106                 |              | PS.base.tb2         
- PL.005               | -104                 |              | PS.base.ta6         
- PL.004               | -103                 |              | PS.base.ta5         
- PL.003               | -102                 |              | PS.base.ta3         
- PL.002               | -101                 |              | PS.base.ta2         
- PL.001               | -0                   | Central call | PS.base.ta1         
-(27 rows)
-
-DELETE FROM xl_Pline WHERE CURRENT OF xl_ins_cursor;
-ERROR:  WHERE CURRENT OF clause not yet supported
-COMMIT;
 --with hold cursor wold be available after the transaction that successfully committed it is gone
 BEGIN;
 declare xl_with_hold_cursor CURSOR WITH HOLD for select * from xl_Pline order by slotname;
index d1fa0519df79836061cff64be058359ce405b9d2..093e0419e93217cc34cd8b4e0537cb22b2ce128a 100644 (file)
@@ -271,3 +271,34 @@ select pct, count(unique1) from
   group by pct;
 
 ------------------------------------------
+
+-- Issue #34 - Insensitive cursors
+
+-- insensitive cursor would be insensitive to updates happening to the table
+-- right now it is sensitive which is a bug (34) in Postgres-XL issue tracker sheet.
+
+create table xl_PLine (
+    slotname   char(20),
+    phonenumber        char(20),
+    comment    text,
+    backlink   char(20)
+);
+
+create unique index xl_PLine_n on xl_PLine using btree (slotname bpchar_ops);
+
+insert into  xl_PLine values ('PL.029', '-502', 'Fax first floor', 'PS.first.ta1');
+insert into  xl_PLine values ('PL.030', '-367', '', 'PS.first.tb6');
+
+BEGIN;
+declare xl_ins_cur INSENSITIVE CURSOR for select * from xl_Pline order by slotname desc;
+
+FETCH FIRST xl_ins_cur;
+delete from xl_Pline where slotname in ('PL.030');
+FETCH FIRST xl_ins_cur;
+delete from xl_Pline where slotname in ('PL.029');
+FETCH FIRST xl_ins_cur;
+COMMIT;
+
+drop table xl_PLine;
+
+------------------------------------------
index 97387f6b646d594a6db1586422315356e7774101..cf795ea60b42f62b223c54deb706e0e68885aa76 100755 (executable)
@@ -223,26 +223,6 @@ FETCH BACKWARD 2 xl_scroll_cursor1;
 DELETE FROM xl_Pline WHERE CURRENT OF xl_scroll_cursor1;
 COMMIT;
 
---insensitive cursor would be insensitive to updates happening to the table
--- right now it is sensitive which is a bug (34) in Postgres-XL issue tracker sheet. 
-BEGIN;
-declare xl_ins_cursor INSENSITIVE CURSOR for select * from xl_Pline order by slotname desc;
-
-FETCH FIRST xl_ins_cursor;
-FETCH ABSOLUTE 5 xl_ins_cursor;
-update xl_Pline set phonenumber='-503' where slotname = 'PL.029';
-insert into  xl_PLine values ('PL.030', '-367', '', 'PS.first.tb6');
-FETCH FIRST xl_ins_cursor;
-select xl_nodename_from_id(xc_node_id), * from xl_Pline where slotname in ('PL.030', 'PL.029') order by slotname;
-delete from xl_Pline where slotname in ('PL.030');
-FETCH FIRST xl_ins_cursor;
-delete from xl_Pline where slotname in ('PL.029');
-FETCH FIRST xl_ins_cursor;
-insert into  xl_PLine values ('PL.029', '-367', '', 'PS.first.tb6');
-FETCH ALL FROM xl_ins_cursor;
-DELETE FROM xl_Pline WHERE CURRENT OF xl_ins_cursor;
-COMMIT;
-
 --with hold cursor wold be available after the transaction that successfully committed it is gone
 BEGIN;