Skip to content

feat(postgre): #412 update merge's syntax, with clause syntax and copy syntax #413

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Cythia828
Copy link
Collaborator

@Cythia828 Cythia828 commented Apr 8, 2025

修改内容

  1. MERGE命令改进:支持RETURNING子句
  2. WITH ... SELECT中WITH从句修改:支持MERGE语句
  3. COPY ... TO 中原本的query也新增支持MERGE语句

参考如下

image

image

image 但是更新的这部分我们的现有g4文件是支持的,只是我们之前没有支持到`FORCE_QUOTE { ( column_name [, ...] ) | * }`这种情况,之前支持了下面文档描述的9.0版本的`FORCE QUOTE { column_name [, ...] | * } ] ]`,当SQL写成`COPY ... WITH (FORCE_NOT_NULL ( column_name))`,就会发现FORCE_NOT_NULL后面的括号报错,所以针对这个问题进行了修复。

issue

#412

@Cythia828 Cythia828 changed the title WIP: feat(postgre): #412 update merge's syntax and with clause syntax feat(postgre): #412 update merge's syntax and with clause syntax Apr 8, 2025
@Cythia828 Cythia828 changed the title feat(postgre): #412 update merge's syntax and with clause syntax draft: feat(postgre): #412 update merge's syntax and with clause syntax Apr 8, 2025
@Cythia828 Cythia828 changed the title draft: feat(postgre): #412 update merge's syntax and with clause syntax feat(postgre): #412 update merge's syntax and with clause syntax Apr 8, 2025
@Cythia828 Cythia828 marked this pull request as draft April 8, 2025 10:00
@Cythia828 Cythia828 marked this pull request as ready for review April 9, 2025 06:00
@Cythia828 Cythia828 changed the title feat(postgre): #412 update merge's syntax and with clause syntax feat(postgre): #412 update merge's syntax, with clause syntax and copy syntax Apr 9, 2025
| OPEN_PAREN copy_generic_opt_elem (COMMA copy_generic_opt_elem)* CLOSE_PAREN
;

copy_options
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要使用下划线了吧,我在 spelling 的那个分支全部更改了PG,使用小驼峰写法

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants