1. download src
down postgres 11.1 from https://ftp.postgresql.org/pub/source/v11.1/
2. compile
refer to https://www.postgresql.org/docs/devel/installation.html
3. run psql
script can find here : https://files.cnblogs.com/files/mangoczp/pg_script.tar.gz