Why my manualy constructed raw parser tree produce failed to execute? - Mailing list pgsql-hackers

From Mohammad Heykal Abdillah
Subject Why my manualy constructed raw parser tree produce failed to execute?
Date
Msg-id 1274983125.18890.68.camel@claudia
Whole thread Raw
Responses Re: Why my manualy constructed raw parser tree produce failed to execute?
List 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 by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: functional call named notation clashes with SQL feature
Next
From: Josh Berkus
Date:
Subject: Re: Idea for getting rid of VACUUM FREEZE on cold pages