您的位置:首页 > 数据库

postgres数据库几个重要的备忘命令

2014-01-10 10:32 357 查看
1. about dumping -----pg_dump -h 10.0.253.110 -U postgres legendary -t festivals > dump.sql

2. create or drop table in psql terminal

psql -h ... -U user -d dbname

DROP TABLE must be upper (大写)

for detail see
http://articles.slicehost.com/2009/7/14/postgresql-creating-and-dropping-tables
3. create database or drop database

psql -h db -U postgres -c "CREATE DATABASE gerrit"

psql -h db -U postgres -c DROP DATABASE gerrit"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: