Re: How to look at the Expression Trees

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: How to look at the Expression Trees
Дата
Msg-id 4D87517F.10502@enterprisedb.com
обсуждение исходный текст
Ответ на Re: How to look at the Expression Trees  (Vaibhav Kaushal <vaibhavkaushal123@gmail.com>)
Список pgsql-hackers
On 21.03.2011 14:37, Vaibhav Kaushal wrote:
> I am already using the postgresql server with -d 4 option and it shows a
> lot of things. But I am not able to see the Expression State trees.

To be precise, debug_print_plan=on prints the expression tree that comes 
from planner, not the execution tree of ExprStates. But the structure of 
the ExprState tree is the same as the planner tree, you just have 
ExprState nodes in place of Expr nodes.

> OK. I
> know that the output DOES show the 'expr' entries. But if those are what
> make the Expression _tree_ then I am not able to understand them. A little
> help on that would be generous.

It is indeed a tree that gets printed with debug_print_plan. There's 
more than the expression tree there, with information about planner the 
relations involved etc. Look for "targetlist" and "qual" fields in the 
output, that's where the expression trees are.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vaibhav Kaushal
Дата:
Сообщение: Re: How to look at the Expression Trees
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Planner regression in 9.1: min(x) cannot use partial index with NOT NULL