Menu

#119 Cursor CURRENT OF for replicated tables

Development Queue
open
5
2012-09-12
2011-02-15
No

Current OF does not look to work for UPDATE and DELETE operations.

For distributed tables
template1=# create table aa (a int, b int);
CREATE TABLE
template1=# insert into aa values (1,1),(1,2),(1,4),(4,8),(2,5);
INSERT 0 4
template1=# begin;
BEGIN
template1=# declare foo cursor for select * from aa_rep for update;
DECLARE CURSOR
template1=# fetch forward from foo;
a | b
---+---
1 | 1
(1 row)

template1=# fetch forward from foo;
a | b
---+---
1 | 2
(1 row)

template1=# delete from aa_rep where current of foo;
DELETE 0
template1=# fetch forward from foo;
a | b
---+---
1 | 4
(1 row)
template1=# delete from aa_rep where current of foo;
DELETE 0
template1=# commit;
COMMIT
template1=# select * from aa;
a | b
---+---
1 | 1
1 | 2
1 | 4
2 | 5
(4 rows)

It works OK for distributed tables.

Discussion

  • Michael Paquier

    Michael Paquier - 2011-02-15

    This case works for the following initialization and not the distributed table case (damn the small windows of this bug tracker :~!)

    template1=# create table aa_rep (a int, b int) distribute by replication;
    CREATE TABLE
    template1=# insert into aa_rep values (1,1),(1,2),(1,4),(4,8);
    INSERT 0 4

     
  • Koichi Suzuki

    Koichi Suzuki - 2011-04-07
    • assigned_to: nobody --> ashutoshbapat
     
  • Abbas Butt

    Abbas Butt - 2012-03-10
    • milestone: --> 2663467
     
  • Abbas Butt

    Abbas Butt - 2012-03-12
    • assigned_to: ashutoshbapat --> gabbasb
    • milestone: 2663467 --> 2663488
     
  • Koichi Suzuki

    Koichi Suzuki - 2012-03-12

    For 1.0, this should be blocked.

     
  • Abbas Butt

    Abbas Butt - 2012-04-16
    • milestone: 2663488 --> 2663467
     
  • Abbas Butt

    Abbas Butt - 2012-04-16

    WHERE CURRENT OF is blocked for now. Moving this case to 1.1 Dev Q

     
  • Koichi Suzuki

    Koichi Suzuki - 2012-09-12

    This should be out of the scope for the next major release.

     
  • Koichi Suzuki

    Koichi Suzuki - 2012-09-12
    • labels: 2091149 --> Database Server
    • milestone: 2663467 --> Development Queue
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.