mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Remove dead code supporting mark/restore in SeqScan, TidScan, ValuesScan.
There seems no prospect that any of this will ever be useful, and indeed it's questionable whether some of it would work if it ever got called; it's certainly not been exercised in a very long time, if ever. So let's get rid of it, and make the comments about mark/restore in execAmi.c less wishy-washy. The mark/restore support for Result nodes is also currently dead code, but that's due to planner limitations not because it's impossible that it could be useful. So I left it in.
This commit is contained in:
@ -19,8 +19,6 @@
|
||||
* ExecInitSeqScan creates and initializes a seqscan node.
|
||||
* ExecEndSeqScan releases any storage allocated.
|
||||
* ExecReScanSeqScan rescans the relation
|
||||
* ExecSeqMarkPos marks scan position
|
||||
* ExecSeqRestrPos restores scan position
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
@ -274,39 +272,3 @@ ExecReScanSeqScan(SeqScanState *node)
|
||||
|
||||
ExecScanReScan((ScanState *) node);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* ExecSeqMarkPos(node)
|
||||
*
|
||||
* Marks scan position.
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
ExecSeqMarkPos(SeqScanState *node)
|
||||
{
|
||||
HeapScanDesc scan = node->ss_currentScanDesc;
|
||||
|
||||
heap_markpos(scan);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* ExecSeqRestrPos
|
||||
*
|
||||
* Restores scan position.
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
ExecSeqRestrPos(SeqScanState *node)
|
||||
{
|
||||
HeapScanDesc scan = node->ss_currentScanDesc;
|
||||
|
||||
/*
|
||||
* Clear any reference to the previously returned tuple. This is needed
|
||||
* because the slot is simply pointing at scan->rs_cbuf, which
|
||||
* heap_restrpos will change; we'd have an internally inconsistent slot if
|
||||
* we didn't do this.
|
||||
*/
|
||||
ExecClearTuple(node->ss_ScanTupleSlot);
|
||||
|
||||
heap_restrpos(scan);
|
||||
}
|
||||
|
Reference in New Issue
Block a user