事前に、VirtualBox上のCentOS7.6をインストールして
postgreSQLをソースからコンパイルしている。
PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit

データベースの作成
create database mei_edinet_db;
大文字は使えない
psycopg2のインストール
Windows側のDOSプロンプトで
pip install psycopg2

ヲタクテーブルを作成しておく
CREATE TABLE wotaku (
tid text NOT NULL,
wota_name text NOT NULL
);
ALTER TABLE ONLY wotaku
ADD CONSTRAINT wotaku_pkey PRIMARY KEY (tid);

import psycopg2
conn = psycopg2.connect("host=192.168.10.8 port=5432 dbname=mei_edinet_db user=mayser")
cur = conn.cursor()
cur.execute("SELECT tid, wota_name FROM wotaku;")
for row in cur:
print(row)
cur.close()
conn.close()
結果
('code2545Light', 'メイザー☆SKKS')