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

Connections pane: library(DBI) turned into library(odbc) #192

Closed
javierluraschi opened this issue Jun 12, 2018 · 3 comments
Closed

Connections pane: library(DBI) turned into library(odbc) #192

javierluraschi opened this issue Jun 12, 2018 · 3 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@javierluraschi
Copy link
Contributor

copy-paste from rstudio/rstudio#1783
CC: @jmcphers

When I create a new connection to a PostgreSQL DB via odbc:

  1. I open the New Connection window
  2. I click on PostgreSQL Unicode(x64)
  3. I fill in the parameters and click Test (success). The following code is displayed in the lower field:
library(DBI)
con <- dbConnect(odbc::odbc(), .connection_string = "Driver={PostgreSQL Unicode(x64)};database=xxx;
server=xxx;
uid=xxx;
pwd=xxx;
port=5432;")
  1. I disconnect con. The following code is displayed in the Connections pane:
library(odbc)
con <- dbConnect(odbc::odbc(), .connection_string = "Driver={PostgreSQL Unicode(x64)};database=xxx;\nserver=xxx;\nuid=xxx;\npwd=xxx;\nport=5432;")

Is there a reason why library(DBI) has turned into library(odbc)?

RStudio 1.1.383

@javierluraschi
Copy link
Contributor Author

javierluraschi commented Jun 12, 2018

BTW. I don't believe there is a bad side effect here, appart from a slight annoyance.

See

odbc/R/Driver.R

Line 124 in 5a31675

c("library(odbc)", deparse(expr)), collapse = "\n"))

@jimhester
Copy link
Contributor

hmm, we should change this for sure though, ideally we should not be promoting attaching odbc

@jimhester jimhester added the bug an unexpected problem or unintended behavior label Jun 12, 2018
javierluraschi added a commit to javierluraschi/odbc that referenced this issue Jun 13, 2018
@javierluraschi
Copy link
Contributor Author

Fair enough, here is a PR: #195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants