import psycopg2conn = psycopg2.connect(database="baoxin", user="odoo", password="odoo", host="127.0.0.1", port="5432")cur = conn.cursor()cur.execute("CREATE TABLE test(id serial PRIMARY KEY, num integer,data varchar);")cur.execute("SELECT * FROM product_category;")rows = cur.fetchall() # all rows in tableprint(rows)for i in rows: print(i)conn.commit()cur.close()conn.close()