According to the PostgreSQL documentation, there appears to be support for SET CONNECTION.
However, when I try to execute it from the psql prompt, I get
ERROR: unrecognized configuration parameter "connection"
I'm well aware of using \connect but I want to be able to switch databases within the execution of a .sql file.
Is this a bug in PostgreSQL? Or does some flag need to be set to create the parameter?