mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-23 17:36:28 +00:00
11 lines
184 B
Python
11 lines
184 B
Python
import psycopg2
|
|
|
|
conn = psycopg2.connect("postgres://random:password@127.0.0.1:6432/db")
|
|
cur = conn.cursor()
|
|
|
|
cur.execute("SELECT 1");
|
|
res = cur.fetchall()
|
|
|
|
print(res)
|
|
|
|
# conn.commit() |