This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.


Welcome To openGauss Community
Hey @liuzhen001 , thanks for your contribution to the community.
Bot Usage Manual
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.
Contact Guide
If you have any questions, please contact the SIG: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zjh_hw .


复用的ON DUPLICATE KEY UPDATE流程
db0=# truncate TABLE test_scene3_1 ;
TRUNCATE TABLE
db0=# INSERT INTO test_scene3_1 (key, fruit, quantity) VALUES (0, 'Zero', 0);
INSERT 0 1
db0=# select * from test_scene3_1 ;
key | fruit | quantity
-----+-------+----------
0 | Zero | 0
(1 row)
db0=# INSERT INTO test_scene3_1 (key, fruit, quantity)
db0-# VALUES (1, 'First', 100), (1, 'Second', 200)
db0-# ON DUPLICATE KEY UPDATE
db0-# fruit = VALUES(fruit), quantity = VALUES(quantity);
INSERT 0 2
db0=# select * from test_scene3_1 ;
key | fruit | quantity
-----+--------+----------
0 | Zero | 0
1 | Second | 200
(2 rows)
要和PG行为一样需要单独增加一个判断


回归版本:7.0.0LTSB018
回归结论:回归通过
回归过程:



测试类型
SQL功能
测试版本
7.0.0LTS
问题描述
操作系统和硬件信息
测试环境
企业版主备
被测功能
预置条件
操作步骤
预期输出
实际输出
opengauss pg兼容性数据库执行结果:

pg数据库执行结果:
日志信息
提单组织
测试团队
测试代码