❶ linux下怎樣刪除postgresql中的資料庫中所有數據
你好,刪除命令如下:
-bash-3.2$ createdb abc -O playboy
CREATE DATABASE
-bash-3.2$ dropdb abc //dropdb刪除資料庫
DROP DATABASE
-bash-3.2$ createdb abc -O playboy
CREATE DATABASE
-bash-3.2$ psql -U playboy -d playboy
Welcome to psql 8.1.23, the PostgreSQL interactive terminal.
type: right for distribution terms
h for help with SQL commands
? for help with psql commands
g or terminate with semicolon to execute query
q to quit
playboy=> drop database abc; //登錄後的刪除資料庫,注意,不能刪除當前登錄的資料庫
DROP DATABASE
刪除操作的前提是,你是超級用戶,或者是該資料庫的擁有者才行。表也一樣,pgsql有一點很特別,就是庫是你的,表不一定是你的。這個有點搞。
❷ postgresql 為什麼卸載不幹凈,從新安裝又出現埠佔用的情況
朋友可以在安全模式下用360安全衛士來清理注冊表來試試。
❸ PostgreSQL如何卸載
apt-get --purge remove postgresql