The following code worked just fine two weeks ago but suddenly stopped working. The only change is, I had to go into windows settings and change the list separator setting from ',' to '|' for a different project. I've since changed it back. There have been no other changes to my machine. I have a DSN called DVDRental. The point of using the DSN is so people don't put passwords in code. I've tried specifying the database and that doesn't work either. The DSN connects properly. It's like sqldf isn't using RPostgreSQL anymore.
Error message: Error in postgresqlNewConnection(drv, ...) : RS-DBI driver: (could not connect postgres@localhost:5432 on dbname "test": FATAL: password authentication failed for user "postgres" )
Error message with db specification:Error in postgresqlNewConnection(drv, ...) : RS-DBI driver: (could not connect postgres@localhost:5432 on dbname "DVDRental": FATAL: password authentication failed for user "postgres" )
Password hasn't changed. When I test the DSN connection, it works. Same password. As I understand it, when RPostgreSQL is loaded, sqldf automatically uses it for connection information. THE DSN points to the proper database. Why would sqldf try to use the test database if the DSN option were set to the proper DSN?
You know what? This was for a class where I wanted to tie knowledge of SQL with R but I think you're right. I'm going to scrap this whole lab and just teach kids the Tidyverse.