Re: about the pstate node

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 博 翟 <powerzbx(at)yahoo(dot)com(dot)cn>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: about the pstate node
Date: 2003-09-20 19:09:11
Message-ID: 26993.1064084951@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?gb2312?q?=B2=A9=D7X=20=B5=D4?= <powerzbx(at)yahoo(dot)com(dot)cn> writes:
> I am trying to analyse the source code in " /backend/paser". And I am really puzzled about the node "PaserState",especially the meaning of p_namespace and p_joinlist!

p_namespace is a list of the FROM items (RangeTblRef's or JoinExpr's)
whose fields can validly be referenced from the current point in the
query. We alter it while scanning the ON clause of a JOIN, for example,
because the ON clause is only allowed to refer to fields from the JOIN's
input tables. p_joinlist has the same structure but is a list of all
the FROM items that the planner must join to execute the query.

Usually the final states of p_namespace and p_joinlist are the same, but
there are special cases where items get entered into only one list or the
other (mostly for NEW and OLD in rules, IIRC).

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dean Gibson (DB Administrator) 2003-09-20 19:53:12 Re: This mail list and its policies
Previous Message Bruno Wolff III 2003-09-20 18:04:11 Re: This mail list and its policies