mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 10:23:43 +03:00
13 lines
270 B
Python
13 lines
270 B
Python
import datetime
|
|
import psycopg
|
|
|
|
#d = datetime.timedelta(12, 100, 9876)
|
|
#print d.days, d.seconds, d.microseconds
|
|
#print psycopg.adapt(d).getquoted()
|
|
|
|
o = psycopg.connect("dbname=test")
|
|
c = o.cursor()
|
|
c.execute("SELECT 1.0 AS foo")
|
|
print c.fetchmany(2)
|
|
print c.fetchall()
|