mplourde / rpostgresql

Automatically exported from code.google.com/p/rpostgresql
0 stars 1 forks source link

Allow service and sslmode parameters. #71

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Supply either of those parameters
2. Errors out.

What is the expected output? What do you see instead?

Login.  Error.

What version of the product are you using? On what operating system?

Doesn't matter.  The source code contains no provisions for this.

Please provide any additional information below.

Please fix :)

Original issue reported on code.google.com by da...@farmersbusinessnetwork.com on 6 Dec 2014 at 5:11

GoogleCodeExporter commented 9 years ago
According to the discussion on the mailing-list:

https://groups.google.com/forum/#!topic/rpostgresql-dev/ELnVUJqjDbk

RPostgreSQL doesn't support SSL by design.

You'll need to run something like pgbouncer to proxy your connections or switch 
to the JDBC driver 
http://ryepup.unwashedmeme.com/blog/2010/11/17/working-with-r-postgresql-ssl-and
-mssql/

Original comment by tagr...@gmail.com on 12 Feb 2015 at 5:43

GoogleCodeExporter commented 9 years ago
I'm happy to remove the SSL part if that's a requirement. It was an
afterthought to the feature I was actually interested in, namely the
ability to use service parameters.  Would that help?

Original comment by da...@farmersbusinessnetwork.com on 17 Feb 2015 at 9:52

GoogleCodeExporter commented 9 years ago
I require SSL/TLS support

Original comment by tagr...@gmail.com on 18 Feb 2015 at 9:48

GoogleCodeExporter commented 9 years ago
This is resolved see http://stackoverflow.com/a/28582949/833093

simply do:

    pg_dsn = paste0(
        'dbname=', dbname, ' ',
        'sslrootcert=', cacert, ' ',
        'sslmode=verify-full'
    )
    dbConnect(RPostgreSQL::PostgreSQL(), dbname=pg_dsn, host=host, port=port, password=password, user='datasciencemachine')

Original comment by tagr...@gmail.com on 18 Feb 2015 at 11:52