7

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.

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Meh, 10 just adds identity columns. The PG dialects are still missing tons of stuff like ts functions etc...
2

Latest in the official hibernate GitHub repository is PostgreSQL10Dialect. However, this one is still not referenced in the latest official documentation.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.