I am using Hibernate 5 and PostgreSQL 11. I checked dialects and the latest is PostgreSQL95Dialect
.
What should I use with a newer version of the database I have?
I assume that there is no major problem using PostgreSQL95Dialect
but it sounds wrong for me, especially database may further upgrade and the closer versions can be updated more seamlessly in the future.
Reason:
The reason, I care about dialects, I want to introduce new type jsonb
which is not supported by Hibernate, so I want to be as close to the contemporary version of a DB as possible, dialect-wise as well.
If you plan to use PostgreSQL 11 features you probably should implement the dialect yourself.
In Hibernate 6.0 new PostgreSQL10Dialect
was introduced. When implementing your own PostgreSQL11Dialect
you probably want to follow the same approach, which is extending PostgreSQL95Dialect
and adding features you need.