about the pstate node

Started by 博譞 翟over 22 years ago2 messagesgeneral
Jump to latest
#1博譞 翟
powerzbx@yahoo.com.cn

Dear Sir:

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!
Would you please explain it for me ?? Thank you !

your sincere zhai

---------------------------------
Do You Yahoo!?
锟斤拷锟矫碉拷锟斤拷锟绞号o拷锟斤拷锟斤拷呕锟酵╗锟斤拷锟斤拷锟戒境锟侥碉拷影]锟侥讹拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷头+锟脚伙拷通锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: 博譞 翟 (#1)
Re: about the pstate node

=?gb2312?q?=B2=A9=D7X=20=B5=D4?= <powerzbx@yahoo.com.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