Why my manualy constructed raw parser tree produce failed to execute?
От | Mohammad Heykal Abdillah |
---|---|
Тема | Why my manualy constructed raw parser tree produce failed to execute? |
Дата | |
Msg-id | 1274983125.18890.68.camel@claudia обсуждение исходный текст |
Ответы |
Re: Why my manualy constructed raw parser tree produce
failed to execute?
|
Список | pgsql-hackers |
Hi all, I have try to understand how parser work. So far the raw parser in PostgreSQL will produce that called "raw parser tree" and the "raw parser tree" will be passed to "analyzer", right? I have modified PostgreSQL, so the program wont call function "raw_parser" -a function container that make by yacc and lex-. The part that i try to modified was at "src/backend/tcop/postgres.c" function "pg_parse_query". I have using GDB to see list and node structure (a parse tree structure that made using yacc) of my working query. I have constructed same list and node structure as my working query, using manual code (lit_make1, lappend, makeNode, etc). GDB pprint show that my manualy constructed list are identically with my working query, at least when i try to compare it by my eye 1 on 1. But when my manualy constructed query tree is execute, it produce "error: unrecognized node type". Now to the question, why my manualy constructed list was failed to execute? I was pretty sure that my list node was identical with yacc. Is there something that i miss when i consctructed my list (perhaps some list structure part that not printed by GDB)? By the way in GBD i using "call pprint(node/list name)" to display my list. Thank You. -- Mohammad Heykal Abdillah <heykal.abdillah@gmail.com>
В списке pgsql-hackers по дате отправления: