Difference between revisions of "Drop PostgreSQL Database"
Jump to navigation
Jump to search
(Created page with "== Purpose == This topic describes how to use the psql command to removes all the catalog entries and data directory permanently from the PostgreSQL environment. == Drop Da...") |
|||
| (3 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
This topic describes how to use the psql command to removes all the catalog entries and data directory permanently from the PostgreSQL environment. | This topic describes how to use the psql command to removes all the catalog entries and data directory permanently from the PostgreSQL environment. | ||
| − | |||
== Drop Database == | == Drop Database == | ||
| − | Just run below command and change it with the database value. '''WARNING : THIS COMMAND WILL DELETE DATABASE!''' | + | Just run below command and change it with the database value. |
| + | <br>'''WARNING : THIS COMMAND WILL DELETE DATABASE!''' | ||
<pre> | <pre> | ||
| − | dropdb -U username -h hostname -p port -i -e databasename | + | [root@gejoreuy ~]# dropdb -U username -h hostname -p port -i -e databasename |
</pre> | </pre> | ||
Note : | Note : | ||
| − | * username: The username to | + | * username: The username that to be used to delete PostgreSQL database. |
* hostname: The hostname of the PostgreSQL database. | * hostname: The hostname of the PostgreSQL database. | ||
* port: The port number of the PostgreSQL database. | * port: The port number of the PostgreSQL database. | ||
* databasename: The PostgreSQL database name. | * databasename: The PostgreSQL database name. | ||
Latest revision as of 10:41, 20 June 2020
Purpose
This topic describes how to use the psql command to removes all the catalog entries and data directory permanently from the PostgreSQL environment.
Drop Database
Just run below command and change it with the database value.
WARNING : THIS COMMAND WILL DELETE DATABASE!
[root@gejoreuy ~]# dropdb -U username -h hostname -p port -i -e databasename
Note :
- username: The username that to be used to delete PostgreSQL database.
- hostname: The hostname of the PostgreSQL database.
- port: The port number of the PostgreSQL database.
- databasename: The PostgreSQL database name.