I would like to be able to write sql query that changes the database to which I am currently logged in.
Example:
$ psql my_db
psql(9.1.1)
my_db=> ALTER DATABASE my_db SET some_variable = '0';
^^^^^
Is there a way to avoid specifying the database name in this query?
If you’re on 9.1 you can use: