PostgreSQL 的 语法分析的理解(七)

把target_list 中的这一段改变一下:

| a_expr IDENT                    
    {                
        $$ = makeNode(ResTarget);            
        $$->name = $2;            
        $$->indirection = NIL;            
        $$->val = (Node *)$1;            
        $$->location = @1;            
    }                

变成:


| a_expr IDENT { $$ = makeNode(ResTarget); $$->name = $2; $$->indirection = NIL; $$->val = (Node *)$1; $$->location = @1;
fprintf(stderr,"target_list,IDENT,%s\n",$2); }

psql执行:select id myid from a6;

后台出现:target_list, IDENT,myid

posted @ 2012-09-05 16:43  健哥的数据花园  阅读(314)  评论(0编辑  收藏  举报