浪人 发表于 2016-11-20 08:14:00

postgresql drop create database

su - postgres
cd bin
--drop database
./dropdb -U postgres Jedi_SafeNet
--create database
./createdb -E UTF-8 -U postgres Jedi_SafeNet
--excute database script
./psql -d Jedi_SafeNet -f Jedi_SafeNet_DB.TXT-U postgres

Informational
\d       describe table, index, sequence, or view
\d{t|i|s|v|S} (add "+" for more detail)
               list tables/indexes/sequences/views/system tables
\da list aggregate functions
\db list tablespaces (add "+" for more detail)
\dc list conversions
\dC            list casts
<font color="#3333FF">\dd show comment for object</font>
\dD list domains
\df list functions (add "+" for more detail)
\dg list groups
\dn list schemas (add "+" for more detail)
\do    list operators
\dl            list large objects, same as \lo_list
<font color="#3333FF">\dp list table, view, and sequence access privileges</font>
\dT list data types (add "+" for more detail)
\du list users
<font color="#3366FF">\l             list all databases (add "+" for more detail)</font>
\z    list table, view, and sequence access privileges (same as \dp)
页: [1]
查看完整版本: postgresql drop create database