diff --git a/.gitignore b/.gitignore
index 5b7f3dabcf..d1bc7d6b1d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,7 @@ target/
*.graphml
#prevent license accepting file to get accidentially commited to git
-container-license-acceptance.txt
\ No newline at end of file
+container-license-acceptance.txt
+
+# macOS Finder files
+.DS_Store
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index eeaa0b9e93..734b62f6b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,6 +42,7 @@
4.0.3
0.1.4
+ 2.12.3
2017
diff --git a/spring-data-jdbc/pom.xml b/spring-data-jdbc/pom.xml
index af9ad0904e..b325609949 100644
--- a/spring-data-jdbc/pom.xml
+++ b/spring-data-jdbc/pom.xml
@@ -264,6 +264,13 @@
test
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.databind.version}
+ test
+
+
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/dialect/PostgresDialectIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/dialect/PostgresDialectIntegrationTests.java
new file mode 100644
index 0000000000..9d0f4cd735
--- /dev/null
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/dialect/PostgresDialectIntegrationTests.java
@@ -0,0 +1,239 @@
+package org.springframework.data.jdbc.core.dialect;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.postgresql.util.PGobject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.*;
+import org.springframework.core.convert.converter.Converter;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.convert.CustomConversions;
+import org.springframework.data.convert.ReadingConverter;
+import org.springframework.data.convert.WritingConverter;
+import org.springframework.data.jdbc.core.convert.JdbcCustomConversions;
+import org.springframework.data.jdbc.core.mapping.JdbcSimpleTypes;
+import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
+import org.springframework.data.jdbc.testing.TestConfiguration;
+import org.springframework.data.mapping.model.SimpleTypeHolder;
+import org.springframework.data.relational.core.dialect.Dialect;
+import org.springframework.data.relational.core.mapping.Table;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Tests for PostgreSQL Dialect.
+ * Start this test with -Dspring.profiles.active=postgres
+ *
+ * @author Nikita Konev
+ */
+@EnabledIfSystemProperty(named = "spring.profiles.active", matches = "postgres")
+@ContextConfiguration
+@Transactional
+@ExtendWith(SpringExtension.class)
+public class PostgresDialectIntegrationTests {
+
+ private static final ByteArrayOutputStream capturedOutContent = new ByteArrayOutputStream();
+ private static PrintStream previousOutput;
+
+ @Profile("postgres")
+ @Configuration
+ @Import(TestConfiguration.class)
+ @EnableJdbcRepositories(considerNestedRepositories = true,
+ includeFilters = @ComponentScan.Filter(value = CustomerRepository.class, type = FilterType.ASSIGNABLE_TYPE))
+ static class Config {
+
+ private final ObjectMapper objectMapper = new ObjectMapper();
+
+ @Bean
+ Class> testClass() {
+ return PostgresDialectIntegrationTests.class;
+ }
+
+ @WritingConverter
+ static class PersonDataWritingConverter extends AbstractPostgresJsonWritingConverter {
+
+ public PersonDataWritingConverter(ObjectMapper objectMapper) {
+ super(objectMapper, true);
+ }
+ }
+
+ @ReadingConverter
+ static class PersonDataReadingConverter extends AbstractPostgresJsonReadingConverter {
+ public PersonDataReadingConverter(ObjectMapper objectMapper) {
+ super(objectMapper, PersonData.class);
+ }
+ }
+
+ @WritingConverter
+ static class SessionDataWritingConverter extends AbstractPostgresJsonWritingConverter {
+ public SessionDataWritingConverter(ObjectMapper objectMapper) {
+ super(objectMapper, true);
+ }
+ }
+
+ @ReadingConverter
+ static class SessionDataReadingConverter extends AbstractPostgresJsonReadingConverter {
+ public SessionDataReadingConverter(ObjectMapper objectMapper) {
+ super(objectMapper, SessionData.class);
+ }
+ }
+
+ private List