From 416cb03687f3bc2872ae4ce8e66edd9d868e2992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Derosiaux?= Date: Sat, 12 Mar 2016 23:39:04 +0100 Subject: [PATCH] Ignore case when testing for table existence --- .../druid/metadata/storage/postgresql/PostgreSQLConnector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-core/postgresql-metadata-storage/src/main/java/io/druid/metadata/storage/postgresql/PostgreSQLConnector.java b/extensions-core/postgresql-metadata-storage/src/main/java/io/druid/metadata/storage/postgresql/PostgreSQLConnector.java index bde6f4de5d5..ffe38fc8966 100644 --- a/extensions-core/postgresql-metadata-storage/src/main/java/io/druid/metadata/storage/postgresql/PostgreSQLConnector.java +++ b/extensions-core/postgresql-metadata-storage/src/main/java/io/druid/metadata/storage/postgresql/PostgreSQLConnector.java @@ -72,7 +72,7 @@ public class PostgreSQLConnector extends SQLMetadataConnector public boolean tableExists(final Handle handle, final String tableName) { return !handle.createQuery( - "SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = 'public' AND tablename LIKE :tableName" + "SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = 'public' AND tablename ILIKE :tableName" ) .bind("tableName", tableName) .map(StringMapper.FIRST)