Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

drop_database(7) [centos man page]

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)
Man Page

15 More Discussions You Might Find Interesting

1. AIX

command to give me Database

Which is command I could used, to give me the kind of database ,size of database and version of database ? (4 Replies)
Discussion started by: magasem
4 Replies

2. Shell Programming and Scripting

unix command to find the version of Informix database

Hi All Please let me know if there is command to check the version of the informix database installed..? Thanks in advance. Suresh (4 Replies)
Discussion started by: sureshg_sampat
4 Replies

3. UNIX for Advanced & Expert Users

Any way to know wt command has been executed from last 2-3 days ?

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)
Discussion started by: manoja422002
3 Replies

4. Linux

MySQL DATABASE AND LINUX SYSTEMS ADMINISTRATOR

(3 Replies)
Discussion started by: danny.aiello22
3 Replies

5. UNIX for Dummies Questions & Answers

Question about database in Unix

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)
Discussion started by: wendyz
5 Replies

6. Shell Programming and Scripting

Search a line and output next line as well

Hi, I have a requirement to search a particular text and if found print next line also. Appreciate your help. Thanks (10 Replies)
Discussion started by: kamranjalal
10 Replies

7. Shell Programming and Scripting

remove "|" after selection

how to remove -> "|" |USERID| after select from database before assign to the variable? thank you (9 Replies)
Discussion started by: ryanW
9 Replies

8. Shell Programming and Scripting

Help with script

#!/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)
Discussion started by: zulfikarmd
11 Replies

9. Programming

Need help on Shell script for database maintainace..

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)
Discussion started by: ashokkumar.p
3 Replies

10. Solaris

Check executed commands from remote hosts

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)
Discussion started by: @dagio
8 Replies

11. UNIX for Dummies Questions & Answers

Issue with SPOOL

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)
Discussion started by: kusathy
3 Replies

12. Shell Programming and Scripting

sql dump file - how to get certain values using sed

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)
Discussion started by: ashokvpp
5 Replies

13. Shell Programming and Scripting

Case conversion within a command

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)
Discussion started by: jjoy
4 Replies

14. Homework & Coursework Questions

Help fixing my database script

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)
Discussion started by: gamernerd101
5 Replies

15. UNIX for Advanced & Expert Users

Small database that can be bundled with UNIX

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)
Discussion started by: Jcpratap
8 Replies