pacmanで入れようとしたら11系しかなかったから自前でビルドした.
1. msys2の起動
64bit環境なのでスタートメニューから
MSYS2 MinGW 64-bit
で起動した.
2. 必要なパッケージのインストール
必要ないものも入れたかも.
$ pacman -Syu $ pacman --needed -S git mingw-w64-x86_64-gcc base-devel mingw-w64-x86_64-toolchain zlib zlib-devel
3. リポジトリからコードを取得
バージョンはお好みで.
git tagで適当に調べてそれっぽいのをチェックアウトした.
$ git clone git://git.postgresql.org/git/postgresql.git $ cd postgresql $ git checkout REL9_6_12 $ ./configure --host=x86_64-w64-mingw32 && make && make install
4. 確認
$ psql --version psql (PostgreSQL) 9.6.12 $ which pg_restore /mingw64/bin/pg_restore $ which pg_dump /mingw64/bin/pg_dump