Skip to content

Extra connection params - #83

Merged
krlmlr merged 4 commits into
r-dbi:masterfrom
thrasibule:extra_connection_params
Aug 7, 2017
Merged

krlmlr merged 4 commits into
r-dbi:masterfrom
thrasibule:extra_connection_params

Conversation

@thrasibule

Copy link
Copy Markdown
Contributor

This closes #75. I had to export the pid in dbGetInfo to facilitate testing.

Comment thread R/connection.R

opts <- unlist(list(dbname = dbname, user = user, password = password,
host = host, port = as.character(port), service = service, client_encoding = "utf8"))
host = host, port = as.character(port), service = service, client_encoding = "utf8", ...))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there no restriction on the naming of options?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The options name are arbitrary, they're all listed here: http://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS. We can add them all as keywords arguments, or pass them in the .... The way the code was written, the ... wasn't used at all, even though it was documented as a way to pass extra options. If you pass an incorrect option, it throws an error with an informative error message, so I think it's fine not filtering the options explicitely.

@thrasibule
thrasibule force-pushed the extra_connection_params branch from 5439f93 to e10dadf Compare December 17, 2016 21:44
@krlmlr
krlmlr merged commit e10dadf into r-dbi:master Aug 7, 2017
krlmlr added a commit that referenced this pull request Aug 7, 2017
- `dbConnect()` now accepts arbitrary connection parameters in the `...` argument (#83, @thrasibule).
@krlmlr

krlmlr commented Aug 7, 2017

Copy link
Copy Markdown
Member

Thanks!

krlmlr added a commit that referenced this pull request Aug 7, 2017
- Update Rcpp registration code.
- `dbConnect()` now accepts arbitrary connection parameters in the `...` argument (#83, @thrasibule).
- Handles NA values by converting them to NULL (#82, @thrasibule).
- Handle string quoting and missing values in strings (#89, @jimhester).
- `PKG_CFLAGS` and `PKG_LIBS` are now being set when using pg_config for `includedir` and `libdir` (#119, @Usman-R).
- Use `BYTEA` instead of `BLOB` for PostgreSQL 9.5 support.
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parameter application_name isn't set on dbConnect()

2 participants