小编Ton*_*phy的帖子

H2数据库Postgres模式Upsert

当H2数据库处于Postgres模式时,如何检查它是否支持以下语句(upsert/on conflict)

INSERT INTO event_log_poller_state(aggregate_type, consumer_group_id, value) VALUES (?, ?, ?) on conflict (aggregate_type, consumer_group_id) " +
                    " do update SET VALUE = ? WHERE event_log_poller_state.aggregate_type = ? AND event_log_poller_state.consumer_group_id = ?
Run Code Online (Sandbox Code Playgroud)

我得到语法错误42000

我写了以下程序来演示

https://github.com/tonymurphy/h2-postgres

java postgresql h2

8
推荐指数
1
解决办法
1015
查看次数

标签 统计

h2 ×1

java ×1

postgresql ×1