Permalink
Browse files

fix DoesTableExist for PostgreSQL

  • Loading branch information...
tomaszkubacki committed Mar 6, 2012
1 parent 60c8da7 commit c6366150209bd9c0b15993f6ae677215df7ee52b
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/ServiceStack.OrmLite.PostgreSQL/PostgreSQLDialectProvider.cs
@@ -140,7 +140,7 @@ public override SqlExpressionVisitor<T> ExpressionVisitor<T>()
public override bool DoesTableExist(IDbCommand dbCmd, string tableName)
{
- var sql = "SELECT relname FROM pg_class WHERE relname = {0}"
+ var sql = "SELECT COUNT(*) FROM pg_class WHERE relname = {0}"
.SqlFormat(tableName);
dbCmd.CommandText = sql;

0 comments on commit c636615

Please sign in to comment.