alter databasename postgres code example
Example 1: postgres rename database
ALTER DATABASE "old_dbname" RENAME TO "new_dbname"
Example 2: change database postgres
psql: \connect DBNAME. or in short: \c DBNAME.
ALTER DATABASE "old_dbname" RENAME TO "new_dbname"
psql: \connect DBNAME. or in short: \c DBNAME.