https://qiita.com/kumazo/items/483f47360f8b61a9fbb9
https://blog.serverworks.co.jp/postgres_jsonb_search
import psycopg2
# connect postgreSQL
users = 'postgres'
dbnames = 'postgres'
passwords = '123qwe!'
conn = psycopg2.connect(" user=" + users +" dbname=" + dbnames +" password=" + passwords)
conn.autocommit = True
cur = conn.cursor()
cur.execute('SELECT * FROM hoge')
results = cur.fetchall()
for r in results:
print(r)
Recommended Posts