Skip to content

Commit 5db91a3

Browse files
author
lutaoact
committed
postgres.sh
1 parent 9894379 commit 5db91a3

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

postgres.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
createuser --superuser -echo sequelize #创建超级用户
2-
createdb --username=sequelize development #利用sequelize用户创建数据库development
1+
#创建超级用户
2+
createuser --superuser --echo sequelize
3+
#利用sequelize用户创建数据库development
4+
createdb --username=sequelize development
35

46
\l #mysql> show databases;
57
\dt #mysql> show tables;
@@ -23,3 +25,10 @@ copy weather to '/Users/lutao/coffee_js/weather.txt';
2325

2426
select _id::"varchar" from trade_records;
2527
SELECT "_id" FROM "trade_records" WHERE "_id"::"varchar" LIKE '%9a7a%'; #cast类型 _id本来为uuid,cast为varchar型的
28+
29+
#如果遇到权限问题,修改/usr/local/var/postgres/pg_hba.conf
30+
#将校验方法改为trust
31+
host all all 127.0.0.1/32 trust
32+
33+
# 激活hstore
34+
CREATE EXTENSION hstore;

0 commit comments

Comments
 (0)