This function changes a PostgreSQL® database's name.
Warning:
The system requires more time to rename larger and more complex databases.
Important:
When you disable the PostgreSQL role, the system disables this function.
newname required | string The database's new name. Warning: If database prefixing is enabled, this parameter must include the database prefix for the account. Example: |
oldname required | string The database's current name. Example: |
cpuser | string The database's owner. Example: |
HTTP Request was successful.
object |
whmapi1 --output=jsonpretty \ rename_postgresql_database \ oldname='database' \ newname='database2'
{- "metadata": {
- "command": "rename_postgresql_database",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}