DROP DATABASE(7) PostgreSQL 9.2.7 Documentation DROP DATABASE(7)NAME
DROP_DATABASE - remove a database
SYNOPSIS
DROP DATABASE [ IF EXISTS ] name
DESCRIPTION
DROP DATABASE drops a database. It removes the catalog entries for the database and deletes the directory containing the data. It can only
be executed by the database owner. Also, it cannot be executed while you or anyone else are connected to the target database. (Connect to
postgres or any other database to issue this command.)
DROP DATABASE cannot be undone. Use it with care!
PARAMETERS
IF EXISTS
Do not throw an error if the database does not exist. A notice is issued in this case.
name
The name of the database to remove.
NOTES
DROP DATABASE cannot be executed inside a transaction block.
This command cannot be executed while connected to the target database. Thus, it might be more convenient to use the program dropdb(1)
instead, which is a wrapper around this command.
COMPATIBILITY
There is no DROP DATABASE statement in the SQL standard.
SEE ALSO
CREATE DATABASE (CREATE_DATABASE(7))
PostgreSQL 9.2.7 2014-02-17 DROP DATABASE(7)
Check Out this Related Man Page
DROP TABLESPACE(7) PostgreSQL 9.2.7 Documentation DROP TABLESPACE(7)NAME
DROP_TABLESPACE - remove a tablespace
SYNOPSIS
DROP TABLESPACE [ IF EXISTS ] name
DESCRIPTION
DROP TABLESPACE removes a tablespace from the system.
A tablespace can only be dropped by its owner or a superuser. The tablespace must be empty of all database objects before it can be
dropped. It is possible that objects in other databases might still reside in the tablespace even if no objects in the current database are
using the tablespace. Also, if the tablespace is listed in the temp_tablespaces setting of any active session, the DROP might fail due to
temporary files residing in the tablespace.
PARAMETERS
IF EXISTS
Do not throw an error if the tablespace does not exist. A notice is issued in this case.
name
The name of a tablespace.
NOTES
DROP TABLESPACE cannot be executed inside a transaction block.
EXAMPLES
To remove tablespace mystuff from the system:
DROP TABLESPACE mystuff;
COMPATIBILITY
DROP TABLESPACE is a PostgreSQL extension.
SEE ALSO
CREATE TABLESPACE (CREATE_TABLESPACE(7)), ALTER TABLESPACE (ALTER_TABLESPACE(7))
PostgreSQL 9.2.7 2014-02-17 DROP TABLESPACE(7)
Is there any way to know, what I have executed on UNIX Command prompt from last 2-3 days ?
One more point, some systems are interconnected, is there any way to know, who others have executed what command from last 2-3 days ?
I am in big trouble guys. Please help me out ASAP. I am working in... (3 Replies)
I want to write a command file in Unix that can access database. what unix command can access database.
Actually, I installed software in SCO Unix, there is a database. but I want to access database without run this software in unix. How can I do? (5 Replies)
#!/bin/ksh
values=`cat testvalue`
DATABASES=`echo "select agroup,tgroup from acc_gen..agroups where tgroup in ( $values )
go
" | isql -Uro -Pcup0fj0e -Sdev1client420 | grep acc_`
echo "$DATABASES"
When, I run the script it gives me result like
acc_fund2 KLU_LP
acc_fund3 ... (11 Replies)
Hi All,
I have to perform some tasks for database maintainace. I am using postgresql on RHEL 4.4.
1) I have to run "vacuumedb" on the database as postgres user.
2) I have to reindex the database as postgres user.
Now i want to write shell script to do these tasks one... (3 Replies)
Hello,
Is there any way to check which user and from which IP executed a command to the server.I need something like the history but with information also from which IP the command executed.
Thanks in advance (8 Replies)
Hi,
I use SunOS and i connect to database via isql. When tried using SPOOL command to extract the report from database, system thrown me saying "Spoool command not found".
Please advise. (3 Replies)
Hi,
I have a dumpfile.sql -
========Start of file=================
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */;
CREATE TABLE `test_table1` (
`id` int
) AUTO_INCREMENT=12
CREATE TABLE `test_table2` (
`id` int
) AUTO_INCREMENT=120... (5 Replies)
Hi All,
I need the variable to be set in both uppercase and lowercase in a single command
DATABASE=ORCL
something like the below which is absolutly wrong
find /ora/admin/11.1.0/diag/rdbms/{print tolower($0)}${DATABASE}/{print toupper($0)}${DATABASE}
The o/p should be as below:... (4 Replies)
1. The problem statement, all variables and given/known data:
I need help I get a variant of syntax errors when compiling my script to maintain a database. It's a simple database meant to create/view/maintain vehicles.
2. Relevant commands, code, scripts, algorithms:
my if statements have... (5 Replies)
Hi All,
I am working on a file transfer tool between unix servers.
for this i am looking for a small database which is free and compatible with all unix OS and can be bundled in a package with other scripts.
Any suggestions (8 Replies)