Create Postgres DB
用指令 createdb -U username mydb 新增資料庫
建立後 可以用 psql -U username mydb 進入
用 dropdb -U username dbname 可以刪掉資料庫
一些簡單的指令: https://www.postgresql.org/docs/8.1/tutorial-accessdb.html
接著可以建立 table,
CREATE TABLE weather (
city varchar(80),
temp_lo int, -- low temperature
temp_hi int, -- high temperature
prcp real, -- precipitation
date date
);
也可以刪除表
DROP TABLE tablename;
坑
為什麼每次都遇到很鳥的問題啊幹
明明 superuser 都對還是過不了,最後是去修改 pg_hba.conf
將 md5 那欄改為 trust 即可