对PostgreSQL语法分析中 targetlist 的理解
2012-09-06 15:39
295 查看
在 gram.y 中:
把它修改一下,增加:
psql 中执行: select id, name from a8;
后台出现: length of list: 2
simple_select: SELECT opt_distinct target_list into_clause from_clause where_clause group_clause having_clause window_clause { SelectStmt *n = makeNode(SelectStmt); n->distinctClause = $2; n->targetList = $3; n->intoClause = $4; n->fromClause = $5; n->whereClause = $6; n->groupClause = $7; n->havingClause = $8; n->windowClause = $9; $$ = (Node *)n; } ……
把它修改一下,增加:
simple_select: SELECT opt_distinct target_list into_clause from_clause where_clause group_clause having_clause window_clause { SelectStmt *n = makeNode(SelectStmt); n->distinctClause = $2; n->targetList = $3; n->intoClause = $4; n->fromClause = $5; n->whereClause = $6; n->groupClause = $7; n->havingClause = $8; n->windowClause = $9; $$ = (Node *)n; fprintf(stderr,"length of list: %d\n", n->targetList->length); } ……
psql 中执行: select id, name from a8;
后台出现: length of list: 2
相关文章推荐
- PostgreSQL 的target_list分析(二)
- PostgreSQL 的 语法分析的理解(七)
- PostgreSQL 的 target_list分析(一)
- PostgreSQL 的 语法分析的理解(三)
- PostgreSQL 的 target_list分析(七)
- PostgreSQL 的 语法分析的理解(六)
- PostgreSQL 的 语法分析的理解(二)
- PostgreSQL 的 语法分析的理解(四)
- PostgreSQL 的 target_list分析(四)
- PostgreSQL 的 语法分析的理解(五)
- PostgreSQL 语法分析中所使用的List
- PostgreSQL 的 target_list分析(六)
- PostgreSQL 的 target_list分析(五)
- PostgreSQL 的 target_list分析(三)
- [李景山php] 深入理解PHP内核[读书笔记]--第二章:用户代码执行--PHP脚本的执行 词法分析和语法分析
- Leetcode: Sort List 理解分析
- 试图搞懂MDK程序下载到flash--MDK配置选项Linker、Target、Debug的理解分析
- Leetcode Linked List Cycle II 理解分析
- 试图搞懂MDK程序下载到flash(三)--MDK配置选项Linker、Target、Debug的理解分析
- PostgreSQL的语法分析的学习研究(一)