@@ -1271,21 +1271,6 @@ heap_endscan(TableScanDesc sscan)
12711271 pfree (scan );
12721272}
12731273
1274- #ifdef HEAPDEBUGALL
1275- #define HEAPDEBUG_1 \
1276- elog(DEBUG2, "heap_getnext([%s,nkeys=%d],dir=%d) called", \
1277- RelationGetRelationName(scan->rs_rd), scan->rs_nkeys, (int) direction)
1278- #define HEAPDEBUG_2 \
1279- elog(DEBUG2, "heap_getnext returning EOS")
1280- #define HEAPDEBUG_3 \
1281- elog(DEBUG2, "heap_getnext returning tuple")
1282- #else
1283- #define HEAPDEBUG_1
1284- #define HEAPDEBUG_2
1285- #define HEAPDEBUG_3
1286- #endif /* !defined(HEAPDEBUGALL) */
1287-
1288-
12891274HeapTuple
12901275heap_getnext (TableScanDesc sscan , ScanDirection direction )
12911276{
@@ -1305,8 +1290,6 @@ heap_getnext(TableScanDesc sscan, ScanDirection direction)
13051290
13061291 /* Note: no locking manipulations needed */
13071292
1308- HEAPDEBUG_1 ; /* heap_getnext( info ) */
1309-
13101293 if (scan -> rs_base .rs_flags & SO_ALLOW_PAGEMODE )
13111294 heapgettup_pagemode (scan , direction ,
13121295 scan -> rs_base .rs_nkeys , scan -> rs_base .rs_key );
@@ -1315,53 +1298,32 @@ heap_getnext(TableScanDesc sscan, ScanDirection direction)
13151298 scan -> rs_base .rs_nkeys , scan -> rs_base .rs_key );
13161299
13171300 if (scan -> rs_ctup .t_data == NULL )
1318- {
1319- HEAPDEBUG_2 ; /* heap_getnext returning EOS */
13201301 return NULL ;
1321- }
13221302
13231303 /*
13241304 * if we get here it means we have a new current scan tuple, so point to
13251305 * the proper return buffer and return the tuple.
13261306 */
1327- HEAPDEBUG_3 ; /* heap_getnext returning tuple */
13281307
13291308 pgstat_count_heap_getnext (scan -> rs_base .rs_rd );
13301309
13311310 return & scan -> rs_ctup ;
13321311}
13331312
1334- #ifdef HEAPAMSLOTDEBUGALL
1335- #define HEAPAMSLOTDEBUG_1 \
1336- elog(DEBUG2, "heapam_getnextslot([%s,nkeys=%d],dir=%d) called", \
1337- RelationGetRelationName(scan->rs_base.rs_rd), scan->rs_base.rs_nkeys, (int) direction)
1338- #define HEAPAMSLOTDEBUG_2 \
1339- elog(DEBUG2, "heapam_getnextslot returning EOS")
1340- #define HEAPAMSLOTDEBUG_3 \
1341- elog(DEBUG2, "heapam_getnextslot returning tuple")
1342- #else
1343- #define HEAPAMSLOTDEBUG_1
1344- #define HEAPAMSLOTDEBUG_2
1345- #define HEAPAMSLOTDEBUG_3
1346- #endif
1347-
13481313bool
13491314heap_getnextslot (TableScanDesc sscan , ScanDirection direction , TupleTableSlot * slot )
13501315{
13511316 HeapScanDesc scan = (HeapScanDesc ) sscan ;
13521317
13531318 /* Note: no locking manipulations needed */
13541319
1355- HEAPAMSLOTDEBUG_1 ; /* heap_getnextslot( info ) */
1356-
13571320 if (sscan -> rs_flags & SO_ALLOW_PAGEMODE )
13581321 heapgettup_pagemode (scan , direction , sscan -> rs_nkeys , sscan -> rs_key );
13591322 else
13601323 heapgettup (scan , direction , sscan -> rs_nkeys , sscan -> rs_key );
13611324
13621325 if (scan -> rs_ctup .t_data == NULL )
13631326 {
1364- HEAPAMSLOTDEBUG_2 ; /* heap_getnextslot returning EOS */
13651327 ExecClearTuple (slot );
13661328 return false;
13671329 }
@@ -1370,7 +1332,6 @@ heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *s
13701332 * if we get here it means we have a new current scan tuple, so point to
13711333 * the proper return buffer and return the tuple.
13721334 */
1373- HEAPAMSLOTDEBUG_3 ; /* heap_getnextslot returning tuple */
13741335
13751336 pgstat_count_heap_getnext (scan -> rs_base .rs_rd );
13761337
0 commit comments