How to send application name to RPostgreSQL connection

I know that the PostgreSQL database allows you to track the application name for each connection, and it looks like the application_name variable should work with RPostgreSQL, but how exactly should I do it? Adding the program_name = "test" variable to dbConnect does not work.

+4
source share
1 answer

I'm not sure what you can pass application_name='test'as an argument dbConnectto RPostgreSQL (there is an optional argument options, but I could not figure out what data it expects).

An alternative would be to run the following SQL query immediately after opening the connection:

SET application_name='test'

, .

+2

All Articles