connections icon indicating copy to clipboard operation
connections copied to clipboard

Obscured connection details are odd in the connections pane

Open blairj09 opened this issue 5 years ago • 0 comments

If you obscure connection details, by using config for example, then the resulting connections pane can be a bit odd. The following connection uses config to store the credentials:

con <- connection_open(
  RPostgres::Postgres(),
  host =  get("host"),
  user = get("user"),
  password = get("pwd"),
  port = get("port"),
  dbname = get("database")",
  bigint = "integer"
)

Then this connection is made, the following shows up in the RStudio IDE:

image

Notice that get("database") persists in the connections pane. The name of the database is "retail", as evidenced when the following code is used:

con <- dbConnect(
  odbc::odbc(),
  driver = "PostgreSQL",
  host =  get("host"),
  user = get("user"),
  password = get("pwd"),
  port = get("port"),
  database = get("database"),
  bigint = "integer"
)

image

In this case, the actual database name ("retail") is shown in the connections pane.

blairj09 avatar Mar 10 '20 21:03 blairj09