把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