{"action":"created","issue":{"url":"https://api.github.com/repos/tidyverse/dplyr/issues/3783","repository_url":"https://api.github.com/repos/tidyverse/dplyr","labels_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3783/labels{/name}","comments_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3783/comments","events_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3783/events","html_url":"https://github.com/tidyverse/dplyr/issues/3783","id":354699652,"node_id":"MDU6SXNzdWUzNTQ2OTk2NTI=","number":3783,"title":"Ignoring case with remote database table filter operations ","user":{"login":"geotheory","id":1282581,"node_id":"MDQ6VXNlcjEyODI1ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282581?v=4","gravatar_id":"","url":"https://api.github.com/users/geotheory","html_url":"https://github.com/geotheory","followers_url":"https://api.github.com/users/geotheory/followers","following_url":"https://api.github.com/users/geotheory/following{/other_user}","gists_url":"https://api.github.com/users/geotheory/gists{/gist_id}","starred_url":"https://api.github.com/users/geotheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geotheory/subscriptions","organizations_url":"https://api.github.com/users/geotheory/orgs","repos_url":"https://api.github.com/users/geotheory/repos","events_url":"https://api.github.com/users/geotheory/events{/privacy}","received_events_url":"https://api.github.com/users/geotheory/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-28T12:02:58Z","updated_at":"2018-08-29T00:56:56Z","closed_at":null,"author_association":"NONE","body":"I've detailed this question on this [SO page](https://stackoverflow.com/questions/52047603/case-sensitivity-with-dplyr-rpostgresql-string-matching).\r\n\r\nI can't figure out how to apply a non-case-sensitive filter query to a remote PostgreSQL table using `dplyr`.  To demonstrate:\r\n\r\n    require(dplyr)\r\n    require(stringr)\r\n    require(RPostgreSQL)\r\n    \r\n    drv <- dbDriver(\"PostgreSQL\")\r\n    con <- dbConnect(drv, dbname=\"mydb\", host=\"localhost\", port=5432, user=\"username\")\r\n    \r\n    # create db table\r\n    copy_to(con, iris, \"iris\", temporary = FALSE)\r\n    \r\n    # dplyr remote database table\r\n    iris_pg <- tbl(con, \"iris\")\r\n    \r\n    iris_pg %>% filter(str_detect(Species, 'setosa')) %>% head(3) %>% collect()\r\n    # A tibble: 3 x 5\r\n      Sepal.Length Sepal.Width Petal.Length Petal.Width Species\r\n    *        <dbl>       <dbl>        <dbl>       <dbl> <chr>  \r\n    1          5.1         3.5          1.4         0.2 setosa \r\n    2          4.9         3            1.4         0.2 setosa \r\n    3          4.7         3.2          1.3         0.2 setosa\r\n    \r\n    iris_pg %>% filter(str_detect(Species, 'Setosa')) %>% head(3) %>% collect()\r\n    # A tibble: 0 x 0\r\n\r\nTo ignore case `stringr::fixed('Setosa', ignore_case=TRUE)` works with tibble filtering. But with the postgres table it has no effect:\r\n\r\n    iris_pg %>% filter(str_detect(Species, stringr::fixed('SETOSA', ignore_case=TRUE))) %>% head(3) %>% collect()\r\n    # A tibble: 0 x 0\r\n\r\nIs there any way around this, or possibly dev plans to accommodate the `ignore_case` arguments or `fixed()` or `regex()` for database table filtering?"},"comment":{"url":"https://api.github.com/repos/tidyverse/dplyr/issues/comments/416787846","html_url":"https://github.com/tidyverse/dplyr/issues/3783#issuecomment-416787846","issue_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3783","id":416787846,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjc4Nzg0Ng==","user":{"login":"geotheory","id":1282581,"node_id":"MDQ6VXNlcjEyODI1ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282581?v=4","gravatar_id":"","url":"https://api.github.com/users/geotheory","html_url":"https://github.com/geotheory","followers_url":"https://api.github.com/users/geotheory/followers","following_url":"https://api.github.com/users/geotheory/following{/other_user}","gists_url":"https://api.github.com/users/geotheory/gists{/gist_id}","starred_url":"https://api.github.com/users/geotheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geotheory/subscriptions","organizations_url":"https://api.github.com/users/geotheory/orgs","repos_url":"https://api.github.com/users/geotheory/repos","events_url":"https://api.github.com/users/geotheory/events{/privacy}","received_events_url":"https://api.github.com/users/geotheory/received_events","type":"User","site_admin":false},"created_at":"2018-08-29T00:56:56Z","updated_at":"2018-08-29T00:56:56Z","author_association":"NONE","body":"Fair enough, thanks Hadley. I'll exploring the suggestions received in SO."}}
{"actor":{"display_login":"geotheory"}}