import psycopgdbh = psycopg.connect('dbname=dbname user=username')print "Connection successful."cur = dbh.cursor()cur.execute("SELECT * FROM myTable")cur.arraysize = 2while 1: row = cur.fetchone() if row is None: break print row dbh.close()
Name (required)
email (will not be published) (required)
Website