Alter database rename should do the job .. (postgres@[local]:58888)[postgres]> create database "TestForBlah"; CREATE DATABASE (postgres@[local]:58888)[postgres]> \l "TestForBlah" List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -------------+----------+----------+-------------+-------------+------------------- TestForBlah | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | (1 row) (postgres@[local]:58888)[postgres]> ALTER DATABASE "TestForBlah" RENAME TO test; ALTER DATABASE (postgres@[local]:58888)[postgres]> \l test List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ------+----------+----------+-------------+-------------+------------------- test | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | (1 row) Von: Edwin UY <edwin.uy@xxxxxxxxx>
Hi, Is there any way to rename a database? I have some databases that are in upper case and some that are a mix of upper and lower case and I want to rename them all as lowercase. For example, I have a TEST and a TestforBlah for example. These are just sample names. Disclaimer: Diese Nachricht und ihr eventuell angehängte Dateien sind nur für den Adressaten bestimmt. Sie kann vertrauliche oder gesetzlich geschützte Daten oder Informationen beinhalten. Falls Sie diese Nachricht irrtümlich erreicht hat, bitten wir Sie höflich, diese unter Ausschluss jeglicher Reproduktion zu löschen und die absendende Person zu benachrichtigen. Danke für Ihre Hilfe. This message and any attached files are for the sole use of the recipient named above. It may contain confidential or legally protected data or information. If you have received this message in error, please delete it without making any copies whatsoever and notify the sender. Thank you for your assistance. |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature