Re: How to rename current database? - Mailing list pgsql-admin

From David G. Johnston
Subject Re: How to rename current database?
Date
Msg-id CAKFQuwYU8=YyVCGLzBJ_qdtVGSQiJak3jKHVo=kmjFASrJHpgg@mail.gmail.com
Whole thread Raw
In response to Re: How to rename current database?  (Scott Whitney <scott@journyx.com>)
List pgsql-admin
On Wed, May 9, 2018 at 5:14 AM, Scott Whitney <scott@journyx.com> wrote:

Hang on. You're baffled that you have to sign up for a mailing list on which experts reside because you lack the expertise to do something?


​The OP is baffled by an instance poor UX ​- for something that seems like it should be simple.  I respect that.


How do I rename a current database in pgAdmin?

The docs are useless ...

Here's a link to the documentation that describes how to rename a database.
I think you'll find that it has all the information you're looking for.
That said, if you feel something is missing you can propose changes or additions to help make the documentation better.

Keep in mind that pgadmin is a tool that can be used when interacting with a postgresql database, it is by no means required to perform database administration tasks.
Personally, I prefer psql, which is also well documented here:

​While both of these are technically correct the complaint is about pgAdmin usability and functionality.  And using ALTER DATABASE when connected to the target database is going to fail in the same way that pgAdmin fails.​

You may have better luck with your pgadmin questions on the pgadmin mailing list here:

​Correct.​

I don't use pgAdmin, but either in pgAdmin or psql I would connect to the "postgres" database (which exists by default) as the "postgres" user and run:

"ALTER DATABASE not_postgres_database RENAME TO new_database_name";​

Figuring out how to do that in pgAdmin will likely require assistance on their mailing list - I see nothing of note in their docs.

David J.

pgsql-admin by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: How do I execute SQL in pgAdmin!?
Next
From: JaeWon Lee
Date:
Subject: Can I use .pgpass in logical replication?