[HACKERS] heap_markpos and heap_restrpos

2006-09-26 Thread Heikki Linnakangas

What's the purpose of mark/restrpos in heapam.c?

AFAIK, mark/restore is only used by merge joins, and you can't feed a 
merge join from a heap scan because merge join requires sorted input.


Unless I'm missing something, heap_markpos and heap_restrpos are dead code.

--
 Heikki Linnakangas
 EnterpriseDB   http://www.enterprisedb.com


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [HACKERS] heap_markpos and heap_restrpos

2006-09-26 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes:
 What's the purpose of mark/restrpos in heapam.c?

It's deadwood --- see the comment for ExecSupportsMarkRestore:

/*
 * ExecSupportsMarkRestore - does a plan type support mark/restore?
 *
 * XXX Ideally, all plan node types would support mark/restore, and this
 * wouldn't be needed.  For now, this had better match the routines above.
 * But note the test is on Plan nodetype, not PlanState nodetype.
 *
 * (However, since the only present use of mark/restore is in mergejoin,
 * there is no need to support mark/restore in any plan type that is not
 * capable of generating ordered output.  So the seqscan, tidscan,
 * functionscan, and valuesscan support is actually useless code at present.)
 */

I haven't seen a reason to take it out, but if you have in mind
something that would actively break it, removing it is no problem.

regards, tom lane

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org