Skip to content

[feature request] implement connection services #90

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

Open
itcarroll opened this issue Aug 15, 2017 · 3 comments
Open

[feature request] implement connection services #90

itcarroll opened this issue Aug 15, 2017 · 3 comments

Comments

@itcarroll
Copy link

Quoting from the current docs:

The connection service file allows libpq connection parameters to be associated with
a single service name. That service name can then be specified by a libpq connection,
and the associated settings will be used.

The implementation should allow creating a connection with

dbConnect(PostgreSQL(), service = 'xyz')

where the (by default) ~/.pg_service.conf file contains an entry for xyz that centrally stores all the connection parameters.

Happy to start work on a PR.

@itcarroll
Copy link
Author

Oh, loophole!

dbConnect(PostgreSQL(), dbname = 'postgresql://@/?service=xyz')

Achieves what I wanted, if inelegantly. I still think it would be good to provide the service parameter as its own argument, so I'll leave my issue open.

@AmyMikhail
Copy link

AmyMikhail commented Feb 4, 2019

Not sure if this is referring to RStudio preview versions >= 1.2.1?

I have installed the preview version and was excited to try out the new SQL database 'connection' feature, only to discover that this has to be set up for each package that makes connections to databases and isn't yet automatically detected for RPostgreSQL.

The FAQ for the preview version says that package authors need to implement the RStudio connections contract.

Would it be possible to implement this for the RPostgreSQL package? This new feature in RStudio would be really useful for creating new queries.

@itcarroll
Copy link
Author

itcarroll commented Feb 4, 2019 via email

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

2 participants