.\" XXX standard disclaimer belongs here....
.\" $Header: /private/postgres/ref/unix/RCS/destroydb,v 1.9 1992/07/14 05:54:17 ptong Exp $
.SP DESTROYDB UNIX 6/14/90
.XA 1 Destroydb
.uh NAME
.lp
destroydb \*- destroy an existing database
.uh SYNOPSIS
.lp
.(l
\fBdestroydb\fR [\fB-p\fR port] [\fB-h\fR host] username
.)l
.uh DESCRIPTION
.lp
.b Destroydb
removes all reference to an existing database named
.i dbname.
The directory containing this database and all associated files
are removed.
.lp
To execute this command, the user must be the
.A DBA
for this database.
After the database is destroyed, a \*(UU shell prompt will reappear;
no confirmation message will be displayed.
.lp
.b Destroydb
needs to connect to a running postmaster to accomplish
its tasks.  If no postmaster is running then one must be started
before destroydb is run.
.lp
.uh "COMMAND OPTIONS"
.lp
\fI-p port\fR indicates that destroydb should attempt to connect to a
postmaster listening to the specified port.
.lp
\fI-h hostname\fR indicates that destroydb should attempt to connect to a
postmaster running on the specified host machine.
.sp
.uh EXAMPLE
.lp
.ft C
/* destroy the demo database */
.ft
.nf
.ft C
destroydb demo
.ft
.fi
.lp
.ft C
/* destroy the demo database using the postmaster on host eden, port 1234 */
.ft
.nf
.ft C
destroydb -p 1234 -h eden demo
.ft
.fi
.uh DIAGNOSTICS
.sp
.lp
\fBError: Failed to connect to backend (host=\fIxxx\fB, port=\fIxxx\fB)\fR
.lp
destroydb could not attach to the postmaster on the specified host and
port.  If you see this message, check that the postmaster is running on
the proper host and that the proper port is specified.
.sp
.uh FILES
.lp
.ft C
\&.../data/base/*
.ft
.uh "SEE ALSO"
.lp
createdb(unix),
postmaster(unix),
destroydb(commands).
