title: Hibernate Dialect?
body: <p>My PostgreSQL version is <code>10.5</code>. What is the correct Hibernate Dialect for <code>hibernate.version 4.3.8.Final</code>? </p>
  
  <p>Please note that the question is about the right Hibernate Dialect; Hibernate versions may be old.</p>
  
  <p>Hibernate <code>org.hibernate.dialect.PostgreSQL95Dialect</code> or <code>org.hibernate.dialect.PostgreSQL82Dialect</code>?</p>
  
  <p>Here's application.properties</p>
  
  <pre><code>#Database related properties
  database.driver=com.postgresql.jdbc.Driver
  database.url=jdbc:postgresql://localhost:5432/springdb
  database.user=postgres
  database.password=*****************
  
  #Hibernate related properties
  hibernate.dialect=org.hibernate.dialect.PostgreSQL95Dialect
  hibernate.show_sql=true
  hibernate.format_sql=true
  hibernate.hbm2ddl.auto=update
  </code></pre>
  
  <p>Here's pom.xml:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.package.spring&lt;/groupId&gt;
      &lt;artifactId&gt;SpringMVCHibernateCRUD&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;SpringMVCHibernateCRUD Maven Webapp&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
      &lt;!-- Specifying the Versions of Spring, Hiberante, PostgreSQL etc --&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;spring.version&gt;4.1.5.RELEASE&lt;/spring.version&gt;
          &lt;hibernate.version&gt;4.3.8.Final&lt;/hibernate.version&gt;  
          &lt;postgresql.version&gt;9.4.1212.jre6&lt;/postgresql.version&gt;
          &lt;junit-version&gt;4.12&lt;/junit-version&gt;
          &lt;servlet-api-version&gt;3.1.0&lt;/servlet-api-version&gt;
          &lt;jsp-version&gt;2.1&lt;/jsp-version&gt;
          &lt;jstl-version&gt;1.2&lt;/jstl-version&gt;
          &lt;java.version&gt;1.10&lt;/java.version&gt;       
      &lt;/properties&gt;
         &lt;dependencies&gt;
                &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Hibernate 4 dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;${hibernate.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-c3p0&lt;/artifactId&gt;
              &lt;version&gt;${hibernate.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!--PostgreSQL Connector --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
              &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
              &lt;version&gt;${postgresql.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Servlet and JSP --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
              &lt;version&gt;${servlet-api-version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
              &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
              &lt;version&gt;${jsp-version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- JSTL dependency --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;jstl&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;version&gt;${jstl-version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- JUnit --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;${junit-version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
         &lt;/dependencies&gt;
         &lt;build&gt;
                &lt;finalName&gt;SpringMVCHibernateCRUD&lt;/finalName&gt;
                &lt;plugins&gt;
                &lt;plugin&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.22.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*Tests.java&lt;/include&gt;
                      &lt;/includes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.version}&lt;/source&gt;
                      &lt;target&gt;${java.version}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  
         &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>