Re: How to rename current database?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: How to rename current database?
Дата
Msg-id 20180509130330.vu3gozt2mk7b6eb3@alvherre.pgsql
обсуждение исходный текст
Ответ на How to rename current database?  (Sven Delle <svdellepude@gmail.com>)
Список pgsql-admin
Sven Delle wrote:

> I’m going to the properties of the database to rename it, but get an
> error: ERROR: current database cannot be renamed.
> 
> Hmm, I guess it’s because it’s currently running, fine – I get that.
> But then, HOW THE HOLY CRAP DO I STOP THE DATABASE SO I CAN RENAME
> IT!?!?!?!?!?!?!?!!?!!?!?

A PostgreSQL server (or "service") hosts multiple databases, and any one
session is connected to one database.  What the message is saying is
that you can't rename the database you're connected to -- it is *not*
that you have to stop the server.  In Postgres terminology, databases
cannot be "stopped"; servers can.

This applies to pgadmin just like to any other program you use to
connect to a database.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-admin по дате отправления:

Предыдущее
От: Scott Whitney
Дата:
Сообщение: Re: How to rename current database?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: How do I execute SQL in pgAdmin!?