I encountered an issue when using onDuplicateKeyUpdate() on a table that 
has both a primary key and a separate unique constraint. The following 
error occurred:
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or 
near "merge" Position: 1 at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725)
 


After investigating, I found that the MERGE statement is supported starting 
from PostgreSQL 15. As a workaround, I believe using onConflict would 
resolve the issue for PostgreSQL 14.

However, to prevent similar syntax errors due to PostgreSQL version 
differences in the future, I would like to know if there is a way to 
explicitly configure jOOQ to target PostgreSQL 14.

Is there an option to specify the PostgreSQL version for jOOQ to ensure 
compatibility?

Thank you for your help!

Best regards,

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/jooq-user/07718f26-6def-4cd9-a00b-b42a1798868fn%40googlegroups.com.

Reply via email to