更新时间:2023-01-31 23:38:34
当您与 PostgreSQL $ c建立连接时$ c>总是到特定的数据库。要访问其他数据库,必须获得新的连接。
When you get a connection to PostgreSQL
it is always to a particular database. To access a different database, you must get a new connection.
在psql中使用 \c
关闭旧的数据库连接并使用指定的数据库和/或凭据获取新的连接。您将获得一个全新的后端流程以及所有内容。
Using \c
in psql closes the old connection and acquires a new one, using the specified database and/or credentials. You get a whole new back-end process and everything.