Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boolean columns are returned as strings #302

Closed
david-cortes opened this issue Sep 27, 2019 · 1 comment
Closed

Boolean columns are returned as strings #302

david-cortes opened this issue Sep 27, 2019 · 1 comment

Comments

@david-cortes
Copy link

david-cortes commented Sep 27, 2019

Steps to reproduce:

  • Open some PostgreSQL connection.
  • Run a query that would retrieve a boolean column - e.g.
DBI::dbGetQuery(con, "select true as c1")
  • Inspect resulting data.frame in R.

Expected behavior: boolean DB results should translate to R logical type (TRUE/FALSE).

Actual behavior: boolean DB results translate to R character type ("0"/"1").

Issue is not present with RPostgreSQL and RPostgres.

@david-cortes
Copy link
Author

Nevermind, just realized there's a connection option BoolsAsChar=0; in postgre.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant