Skip to content

Commit

Permalink
Add Postgres Regex function definitions (#5025)
Browse files Browse the repository at this point in the history
It's not unreasonable for someone to use these functions in a SELECT, so we should have return types for them.
  • Loading branch information
MariusVolkhart authored and hfhbd committed Apr 2, 2024
1 parent b741198 commit cff770e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ class PostgreSqlTypeResolver(private val parentResolver: TypeResolver) : TypeRes
"jsonb_path_exists", "jsonb_path_match", "jsonb_path_exists_tz", "jsonb_path_match_tz" -> IntermediateType(BOOLEAN)
"currval", "lastval", "nextval", "setval" -> IntermediateType(BIG_INT)
"generate_series" -> encapsulatingType(exprList, INTEGER, BIG_INT, REAL, TIMESTAMP_TIMEZONE, TIMESTAMP)
"regexp_count", "regexp_instr" -> IntermediateType(INTEGER)
"regexp_like" -> IntermediateType(BOOLEAN)
"regexp_replace", "regexp_substr" -> IntermediateType(TEXT)
else -> null
}

Expand Down

0 comments on commit cff770e

Please sign in to comment.