Thank you.

In the OSS version, it seems that explicitly changing the target is not 
possible.
I will consider either downgrading jOOQ, upgrading the server, or handling 
it with onConflict.
2025年2月17日月曜日 18:27:27 UTC+9 [email protected]:

> 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/74c63f89-a5cd-42a1-8627-c205bcfc234bn%40googlegroups.com.

Reply via email to