Thanks for your message Please always consider the support matrix to see what your jOOQ version / edition supports. The SQLDialect.POSTGRES dialect always corresponds to the latest supported version: https://www.jooq.org/download/support-matrix
You can use SQLDialect.POSTGRES_14 to explicitly target PostgreSQL 14: https://www.jooq.org/javadoc/latest/org.jooq/org/jooq/SQLDialect.html#POSTGRES_14 Cheers, Lukas On Mon, Feb 17, 2025 at 10:25 AM k s <[email protected]> wrote: > 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 [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/jooq-user/07718f26-6def-4cd9-a00b-b42a1798868fn%40googlegroups.com > <https://groups.google.com/d/msgid/jooq-user/07718f26-6def-4cd9-a00b-b42a1798868fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO7BZAOjXvrkNWqxiB8%3DpK1tBab7DBYjTXr3E-3Ub%3Dn%3D9Q%40mail.gmail.com.
