On Kam, 2010-05-27 at 15:02 -0400, Robert Haas wrote: > On Thu, May 27, 2010 at 1:58 PM, Mohammad Heykal Abdillah > <heykal.abdil...@gmail.com> wrote: > > 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. > > Because you have a bug in your code. > Yes, that i know.
Anyway, this is my manualy generate list node i hope you can point me where it went wrong : In function "pg_parse_query(const char *query_string)" List *my_parsetree_list; my_parsetree_list = NIL; ColumnRef *o = makeNode(ColumnRef); o->type = T_ColumnRef; o->fields = list_make1(makeString("*")); o->location = 16; ResTarget *m = makeNode(ResTarget); m->type = T_ResTarget; m->name = NIL; m->indirection = NIL; m->val = o; m->location = 16; RangeVar *p = makeNode(RangeVar); p->schemaname = NIL; p->relname = "customer"; p->inhOpt = 2; p->istemp = false ; p->alias = NIL; SelectStmt *n = makeNode(SelectStmt); n->type = T_SelectStmt; n->distinctClause = list_make1(NIL);; n->intoClause = NULL; n->targetList = list_make1(m); n->fromClause = list_make1(p); n->whereClause = NULL; n->groupClause = NIL; n->havingClause = NULL; n->valuesLists = NIL; n->sortClause = NIL; n->limitOffset = NULL; n->limitCount = NULL; n->lockingClause = NIL; n->op = 0; n->all = false; n->larg = NULL; n->rarg = NULL; my_parsetree_list = list_make1(n); raw_parsetree_list = my_parsetree_list; if (log_parser_stats) ShowUsage("PARSER STATISTICS"); ... ... and rest its same with original code. Thank You -- Mohammad Heykal Abdillah <heykal.abdil...@gmail.com> -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers