RPostgreSQL
RPostgreSQL copied to clipboard
libpq version 10 or above required for authentication
Hi,
Using the latest version of RPostgreSQL (0.7-4) on windows I seem to not be able to connect to a Postgres database 14.5 using SCRAM authentication. On attempting to connect, the following error is emitted:
Error in postgresqlNewConnection(drv, ...) :
RPosgreSQL error: could not connect ****@***:1234 on dbname "***": SCRAM authentication requires libpq version 10 or above
I suspect that this has to do with the fact that the version of libpq packaged with the windows version is out of date. Do you have any idea how to resolve this? TIA.
Also seeing this issue. I'm on a Mac M1, incidentally; I have latest libpq installed (brew), but I see that this library is bundling libpq 9.x, so I assume that is the issue.
On windows, to bump the bundled library, tool chain to configure and compile the full PostgreSQL + manual work to excise the libpq part for both 32 bit and 64 bit and further adjustment so that both can be compiled was necessary. This is quite laborious though the logic is clear. I cannot spend that much time right now.
On macOS, if you have libpq installed, then compiling from the source in that environment should use that library. The binary package will use the bundled version as there is no standard for libpq availability.
Found a solution by installing the RPostgres library. install.packages("RPostgres")
I've installed the RPostgres and am still experiencing the error.
Installing RPostgres 1.4.5 and using RPostgres::Postgres() in the connection string worked for me on my M1 Macbook pro :-)
@tomoakin, do you have time now to resolve this error? With latest CRAN version, RPostgreSQL_0.7-5, I can confirm this error occurs in attempting a Windows connection and not Linux. It is unfortunate Windows and Mac users must revert to other packages to connect to PostgreSQL.
Also, I noticed a typo in error messages missing the T in package name: RPosgreSQL error: ...