Skip to content

Commit

Permalink
Fix for MONDRIAN-1202. We have to cast the column value before runnin…
Browse files Browse the repository at this point in the history
…g a regular expression check in PgSQL.
  • Loading branch information
lucboudreau committed Sep 4, 2012
1 parent 4a2e03d commit 3c5d6b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/mondrian/spi/impl/PostgreSqlDialect.java
Expand Up @@ -212,8 +212,9 @@ public String generateRegularExpression(String source, String javaRegex) {
javaRegex = javaRegex.replace("\\Q", "");
javaRegex = javaRegex.replace("\\E", "");
final StringBuilder sb = new StringBuilder();
sb.append("cast(");
sb.append(source);
sb.append(" ~ ");
sb.append(" as text) ~ ");
quoteStringLiteral(sb, javaRegex);
return sb.toString();
}
Expand Down

0 comments on commit 3c5d6b7

Please sign in to comment.