skip to Main Content

I know that I can use c to switch databases using psql.

Does PostgreSQL have a command that I can use in a different client? In my case I’m using SQLPro on a Mac, and I can easily switch databases from a menu. I wondered whether there’s a command to do that.

2

Answers


  1. c connects to a different server.

    No, a Postgres server cannot connect you to another Postgres server. That is the client’s job.

    A client may have its own equivalent of c.

    Login or Signup to reply.
  2. What psql does if you use c is to open a new database connection and close the old one. Whether a different client program has a facility like that or not depends entirely on the implementation of that client program. It cannot be a function of the PostgreSQL server.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search