H2数据库Postgres模式Upsert

时间:2016-07-20 20:40:17

标签: java postgresql h2

当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 = ?

我得到语法错误42000

我按照程序编写了

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

0 个答案:

没有答案