ZhangZhihui's Blog  
zzh@ZZHPC:~$ sudo apt install postgresql-client

 

zzh@ZZHPC:~$ psql --version
psql (PostgreSQL) 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1)

 

zzh@ZZHPC:~$ psql postgresql://root:aaa@localhost:5432/zimple_bank
psql (14.9 (Ubuntu 14.9-0ubuntu0.22.04.1), server 16.1)
WARNING: psql major version 14, server major version 16.
         Some psql features might not work.
Type "help" for help.

zimple_bank=# \q
zzh@ZZHPC:~$ psql postgresql://root:aaa@localhost:5432/zimple_bank?sslmode=disable 
psql (14.9 (Ubuntu 14.9-0ubuntu0.22.04.1), server 16.1)
WARNING: psql major version 14, server major version 16.
         Some psql features might not work.
Type "help" for help.

zimple_bank=#

 

zzh@ZZHPC:/zdata/Github/zimplebank/db/scripts$ psql postgresql://root:aaa@localhost:5432/zimple_bank -f 0001_init_schema.up.sql
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
COMMENT
COMMENT
ALTER TABLE
ALTER TABLE
ALTER TABLE

 

posted on 2023-11-27 20:33  ZhangZhihuiAAA  阅读(45)  评论(0)    收藏  举报