Hi, Could anybody help me to rename database in postgresql from the Linux shell
" ALTER DATABASE name RENAME TO newname "
The above statement doesn't execute
Hi, Could anybody help me to rename database in postgresql from the Linux shell
" ALTER DATABASE name RENAME TO newname "
The above statement doesn't execute
You might need priviliges to renmae db. Only db owner or super user can do that, owner also needs a createdb priv.
Also the database you're connected to cannot be renamed, you need to connect to a different one
Which version of PostreSql? From the 8.1 Documentation:
ALTER DATABASE name RENAME TO newname
Only the database owner or a superuser can rename a database; non-superuser owners must also have the CREATEDB privilege. The current database cannot be renamed. (Connect to a different database if you need to do that.)