On Feb 16, 2006, at 21:37 , Dhanaraj wrote:
hi
currently i looking at the postgres src code. I saw the scanner and
parser implemetations at two different places (src/backend/parser/
and /src/bakend/bootstrp). Can anybody tell me the purpose of
having two phases?? or will this help to parse the queries at
different levels?
AFAIK, I don't think the code is exactly the same (though I haven't
checked). The bootstrap code is used to get the PostgreSQL server
started: there is a considerable amount of information stored in the
system catalogs that the server needs to use. The server needs access
to a scanner/parser to be able to read this information. The
bootstrap code provides the server with enough knowledge to get
started. The backend parser and scanner is more feature-filled.
Someone please feel free to step in and correct me if I'm off base :)
Michael Glaesemann
grzm myrealbox com
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend