Switches db in postgesql