I would like to execute a simple sql line each time a new connection is made (on that same connection)
Why?
Using postgres, “set application_name = ‘abc’;” will allow me to keep track of the application using the connections when I query my database server for stats.
Haven’t seen anything that would allow me to do this.
I solved a similar problem recently. I was changing the transaction isolation level after connecting. This example should help you out. It is based on the advice in the final example on this blog post.