Tried to connect R with PostgresSQL but it failed throwing error. Not able to figure out the exact issue.
Executed Script -
pg=dbDriver("PostgreSQL")
con < dbConnect(pg,user="rasao",password="1281",host="localhost",port=5432, dbname="banking_case")
"Error in postgresqlNewConnection(drv, ...) :
RS-DBI driver: (could not connect rasao@localhost:5432 on dbname "banking_case": FATAL: password authentication failed for user "rasao"
Not 100% confident, but I believe I've run into this issue recently, and got around it by putting the credentials into a .pgpass file. Try following this guide
Not 100% sure if this is the best way to do it, but I use a .ini file and then use gsub to extract the credentials. I would also recommend the RPostgres package to connect. Here's a quick example I spun up a while ago.