Skip to content

Obscured connection details are odd in the connections pane #5

@blairj09

Description

@blairj09

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions