Skip to content

Commit

Permalink
schema name now automatically converted to lowercase for Postgres. Added
Browse files Browse the repository at this point in the history
Postgres 41 drivers so now should support both Java 1.6 and 1.7+
  • Loading branch information
schuemie committed Jun 27, 2014
1 parent fd87f9e commit 9a41c78
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<classpathentry kind="lib" path="lib/xmlbeans-2.3.0.jar"/>
<classpathentry kind="lib" path="lib/jtds-1.2.7.jar"/>
<classpathentry kind="lib" path="lib/postgresql-9.3-1101.jdbc4.jar"/>
<classpathentry kind="lib" path="lib/postgresql-9.3-1101.jdbc41.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Binary file added lib/postgresql-9.3-1101.jdbc41.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/org/ohdsi/databases/RichConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public List<String> getTableNames(String database) {
} else if (dbType == DbType.ORACLE) {
query = "SELECT table_name FROM all_tables WHERE owner='" + database.toUpperCase() + "'";
} else if (dbType == DbType.POSTGRESQL) {
query = "SELECT table_name FROM information_schema.tables WHERE table_schema = '" + database + "'";
query = "SELECT table_name FROM information_schema.tables WHERE table_schema = '" + database.toLowerCase() + "'";
}

for (Row row : query(query))
Expand Down

0 comments on commit 9a41c78

Please sign in to comment.