flatten insert_column_list ,index_params, and values_clause #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
insert_column_list,index_params,values_clauseをフラット化しましたinsert_column_list
insert 文のカラム名リストにあたる要素
insert_column_list: insert_column_item { $$ = list_make1($1); } | insert_column_list ',' insert_column_item { $$ = lappend($1, $3); } ;https://github.com/postgres/postgres/blob/b225c5e76ed1053e505e392423b0dab065a3b813/src/backend/parser/gram.y#L12306-L12311
index_params
インデックス定義を複数並べる場合に利用される要素
index_params: index_elem { $$ = list_make1($1); } | index_params ',' index_elem { $$ = lappend($1, $3); } ;https://github.com/postgres/postgres/blob/b225c5e76ed1053e505e392423b0dab065a3b813/src/backend/parser/gram.y#L8267-L8269
values_clause
values 句で 複数の列を書く場合に入れ子になる要素
最も内側のものだけ values キーワードが挟まる点でほかのリストと異なる構造だが、フラット化しても問題なし
https://github.com/postgres/postgres/blob/b225c5e76ed1053e505e392423b0dab065a3b813/src/backend/parser/gram.y#L13588-L13604