Skip to content

Commit

Permalink
#2868 add 'VIEW' type for counting table on Postgresql
Browse files Browse the repository at this point in the history
  • Loading branch information
ufoscw authored and alchan-lee committed Dec 5, 2019
1 parent 7956f7c commit 18b321e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public String getTableCountQuery(JdbcConnectInformation connectInfo, String cata
StringBuilder builder = new StringBuilder();
builder.append(" SELECT COUNT(TABLE_NAME) ");
builder.append(" FROM INFORMATION_SCHEMA.TABLES ");
builder.append(" WHERE TABLE_TYPE = 'BASE TABLE' ");
builder.append(" WHERE TABLE_TYPE IN ('BASE TABLE', 'VIEW') ");
builder.append(" AND TABLE_SCHEMA NOT IN ('pg_catalog', 'information_schema') ");
if(StringUtils.isNotEmpty(schema)){
builder.append(" AND TABLE_SCHEMA = '" + schema + "' ");
Expand Down

0 comments on commit 18b321e

Please sign in to comment.