Why my manualy constructed raw parser tree produce failed to execute?

From: Mohammad Heykal Abdillah <heykal(dot)abdillah(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Why my manualy constructed raw parser tree produce failed to execute?
Date: 2010-05-27 17:58:45
Message-ID: 1274983125.18890.68.camel@claudia
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)abdillah(at)gmail(dot)com>

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-05-27 18:00:24 Re: Idea for getting rid of VACUUM FREEZE on cold pages
Previous Message David E. Wheeler 2010-05-27 17:27:03 Re: functional call named notation clashes with SQL feature