2

Is it possible for sqldf re-use same connection for all the queries? I've an application where I need to set session time zone. I tried sqldf("SET SESSION TIME ZONE 'US/Hawaii'"). Looks like each query is closing and opening new connection to PostgreSQL. Thus after SET SESSION if I use sqldf('show time zone') it still prints localtime.

Is there any way to force sqldf to re-use single connection all the time during the code?

kesavkolla
  • 459
  • 5
  • 14

1 Answers1

2

I found answer in the documentation.

By calling sqldf() in the beginning will create a persistent connection and at the end of code call sqldf() which will close the connection.

kesavkolla
  • 459
  • 5
  • 14