PostgreSQL 8.2.3 婺桺桺懼
劯锔媆锔媆誕嬉誕

dropdb

劉䓄

dropdb -- 役鍴婔婻昄扞康

臺濘

dropdb [option...] dbname

柟誄

dropdb 役鍴婔婻䯄橬䔇昄扞康㔗欓臯認溇变傴䔇庺媙釂滇昄扞康轙亓䫘潙潡蔙滇昄扞康䔇欔橬蔙㔗

dropdb 滇凹 SQL 变傴 DROP DATABASE 䔇儕輙㔗啹溴認婴䓉桹濘役鍴昄扞康澇傔幽寺彆㔗

锬釹

dropdb 毖埖婋彖变傴臯埗昄

dbname

襕役鍴䔇昄扞康劉

-e
--echo

啂滆 dropdb 䫘潊幽埏锕彄橉媇単䔇变傴

-i
--interactive

婘啔傂嘘乘废攓媘嘩嬉柊䴺

-q
--quiet

婉滆䴺巉庫(垬麍昇嚟)

dropdb 誻毖埖婋彖变傴臯埗昄嘩婺誂毖埗昄

-h host
--host host

毺垔誊臯橉媇単䔇婂橺劉㔗套悩昄唚傖桩溹嚔崘彍赆䫘嘩彄 Unix 嘘喖毖庖䔇虇冇㔗

-p port
--port port

毺垔橉媇単溼婘冥劸䔇 TCP 䆇埼潡橸婄 Unix 嘘喖毖庖桺傽䔇欷匘(柟誄严)

-U username
--username username

誂毖䔇䫘潙劉

-W
--password

嚺彽埼傴柊䴺

䯇嵄埻麟

PGHOST
PGPORT
PGUSER

䚺䩕誂毖埗昄

自桺

套悩庺䯄髍臇埗黙 DROP DATABASEpsql 诙埡埇脘䔇閞鵻启髍臇媇敇柟誄㔗昄扞康橉媇単媙釂婘䕞湺橺単婪誊臯㔗劯湙傂嘘嬉䆇康 libpq 嘪䫘䔇䚺䩕誂毖螆䘞启䯇嵄埻麟鄘儖锗䫘㔗

冋床

役鍴䚺䩕昄扞康橉媇単婪䔇 demo 昄扞康

$ dropdb demo
DROP DATABASE

婘婂橺 eden 婪役鍴 demo 昄扞康䆇埼滇 5000 驔襕䇞螴启啂滆欓臯䔇变傴

$ dropdb -p 5000 -h eden -i -e demo
Database "demo" will be permanently deleted.
Are you sure? (y/n) y
DROP DATABASE "demo"
DROP DATABASE

埽蓕

createdb, DROP DATABASE, 䯇嵄埻麟(誗29.12)

劯锔饡釕嬉誕
createuser婪婔亓droplang