Re: What are ExecSeqMarkPos and ExecSeqRestrPos used for

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: DT <kurt023(at)hotmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: What are ExecSeqMarkPos and ExecSeqRestrPos used for
Date: 2013-06-01 04:47:51
Message-ID: 15157.1370062071@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * DT (kurt023(at)hotmail(dot)com) wrote:
>> I'm reading code of nodeSeqscan, and was confused with ExecSeqMarkPos and
>> ExecSeqRestrPos. They are only called by ExecMergeJoin. Could merge join use
>> a plain seqscan as outer/inner plan? If not, what are they used for?

> ExecSeqMarkPos and ExecSeqRestPos are called through execAmi.c's
> generalized ExecMarkPos and ExecRestrPos, which are then used by both
> nodeMergejoin.c and nodeResult.c. Offhand, it seems unlikely that there
> would ever be a path from MergeJoin down to ExecSeqMarkPos as MergeJoin
> requires sorted inputs. Perhaps it could happen with a full cartesian
> product but I don't know that we'd ever use a MergeJoin to implement
> that or that we have such an optimization today.

I'm pretty sure those are dead code. See the comment for
ExecSupportsMarkRestore.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-06-01 05:18:57 Re: Strange behavior of "=" as assignment operator
Previous Message Bosco Rama 2013-06-01 04:14:52 Re: Using a CTE for an update