Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3dec141

Browse files
author
Hiroshi Inoue
committed
Enable backward sequential scan even after reaching EOF.
1 parent 9e34883 commit 3dec141

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/backend/access/heap/heapam.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.65 2000/01/26 05:55:56 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.66 2000/02/09 03:49:47 inoue Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -848,11 +848,6 @@ heap_getnext(HeapScanDesc scandesc, int backw)
848848
if (scan->rs_ptup.t_data == scan->rs_ctup.t_data &&
849849
BufferIsInvalid(scan->rs_pbuf))
850850
{
851-
if (BufferIsValid(scan->rs_nbuf))
852-
ReleaseBuffer(scan->rs_nbuf);
853-
scan->rs_ntup.t_datamcxt = NULL;
854-
scan->rs_ntup.t_data = NULL;
855-
scan->rs_nbuf = UnknownBuffer;
856851
return NULL;
857852
}
858853

@@ -910,11 +905,6 @@ heap_getnext(HeapScanDesc scandesc, int backw)
910905
scan->rs_ptup.t_datamcxt = NULL;
911906
scan->rs_ptup.t_data = NULL;
912907
scan->rs_pbuf = InvalidBuffer;
913-
if (BufferIsValid(scan->rs_nbuf))
914-
ReleaseBuffer(scan->rs_nbuf);
915-
scan->rs_ntup.t_datamcxt = NULL;
916-
scan->rs_ntup.t_data = NULL;
917-
scan->rs_nbuf = InvalidBuffer;
918908
return NULL;
919909
}
920910

@@ -934,11 +924,6 @@ heap_getnext(HeapScanDesc scandesc, int backw)
934924
if (scan->rs_ctup.t_data == scan->rs_ntup.t_data &&
935925
BufferIsInvalid(scan->rs_nbuf))
936926
{
937-
if (BufferIsValid(scan->rs_pbuf))
938-
ReleaseBuffer(scan->rs_pbuf);
939-
scan->rs_ptup.t_datamcxt = NULL;
940-
scan->rs_ptup.t_data = NULL;
941-
scan->rs_pbuf = UnknownBuffer;
942927
HEAPDEBUG_3; /* heap_getnext returns NULL at end */
943928
return NULL;
944929
}
@@ -998,11 +983,6 @@ heap_getnext(HeapScanDesc scandesc, int backw)
998983
scan->rs_ntup.t_datamcxt = NULL;
999984
scan->rs_ntup.t_data = NULL;
1000985
scan->rs_nbuf = InvalidBuffer;
1001-
if (BufferIsValid(scan->rs_pbuf))
1002-
ReleaseBuffer(scan->rs_pbuf);
1003-
scan->rs_ptup.t_datamcxt = NULL;
1004-
scan->rs_ptup.t_data = NULL;
1005-
scan->rs_pbuf = InvalidBuffer;
1006986
HEAPDEBUG_6; /* heap_getnext returning EOS */
1007987
return NULL;
1008988
}

0 commit comments

Comments
 (0)