exec_tlist_length

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: vadim(at)sable(dot)krasnoyarsk(dot)su (Vadim B(dot) Mikheev)
Cc: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: exec_tlist_length
Date: 1998-07-20 17:02:35
Message-ID: 199807201702.NAA07069@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Vadim (or anyone else), can you comment on the use of
exec_tlist_length() vs. ExecTargetListLength(). This was changed in
Mariposa by removing the first one.

The first is called only in the planner.c, and computes the length as:

len = 0;
foreach(tl, targetlist)
{
curTle = lfirst(tl);

if (curTle->resdom != NULL)
len++;
}
return len;

while ExecTargetListLength() uses:

len = 0;
foreach(tl, targetlist)
{
curTle = lfirst(tl);

if (curTle->resdom != NULL)
len++;
else
len += curTle->fjoin->fj_nNodes;
}
return len;

The second counts resdom as one, or add fj_nNodes. Which is correct, or
are they used for different purposes. Seems like the second is more
correct.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1998-07-20 17:12:06 s_lock.h busted
Previous Message Bruce Momjian 1998-07-20 15:44:50 Re: [HACKERS] Finding primary keys in a table