Brief description of the problem:
library(dbplyr)
translate_sql(substring('abcdefghijklmno', 6,7))
#> Expected: <SQL> substring('abcdefghijklmno', 6, 7)
#> Actual: <SQL> substring('abcdefghijklmno', 6.0, 7.0)
It looks like there was a fix here, but almost two years later, I don't seem to have it. I don't know which version the fix went into.
Maybe I have an old version?
> packageVersion("dbplyr")
[1] ‘1.4.2’
> packageVersion("tidyverse")
[1] ‘1.3.0’
I tried dbplyr from the vanilla tidyverse install (1.3.0), then I also tried installing dbplyr from github:
devtools::install_github("tidyverse/dbplyr")
In both cases it looks like the numbers become float (numeric), and that makes Postgres (11) cranky in some other code I have:
Error in postgresqlExecStatement: RS-DBI driver: (could not Retrieve the result : ERROR: function pg_catalog.substring(text, numeric, numeric) does not exist.
Brief description of the problem:
It looks like there was a fix here, but almost two years later, I don't seem to have it. I don't know which version the fix went into.
Maybe I have an old version?
I tried dbplyr from the vanilla tidyverse install (1.3.0), then I also tried installing dbplyr from github:
In both cases it looks like the numbers become float (numeric), and that makes Postgres (11) cranky in some other code I have: