July 2005
Intermediate to advanced
1032 pages
27h 10m
English
Before going much further, you should understand the procedure that PostgreSQL follows whenever it executes a query on your behalf.
After the PostgreSQL server receives a query from the client application, the text of the query is handed to the parser. The parser scans through the query and checks it for syntax errors. If the query is syntactically correct, the parser will transform the query text into a parse tree. A parse tree is a data structure that represents the meaning of your query in a formal, unambiguous form.
Given the query
SELECT customer_name, balance FROM customers WHERE balance > 0 ORDER BY balance
the parser might come up with a parse tree structured as shown in Figure 4.5.
Read now
Unlock full access