## Regarder les examples dans /home/regnier/download/pypgsql/examples et /home/regnier/download/pypgsql/test

from pyPgSQL import PgSQL

##db = PgSQL.connect('localhost:atelier','dbuser','xxxxxxxx')
db = PgSQL.connect('localhost::atelier:dbuser:dbuser')
# print PgSQL.paramstyle
##pgdb.paramstyle = 'qmark'
# print PgSQL.paramstyle
cur = db.cursor()
x = 4 > 2
x2 = "to'to"
##cur.execute("select * from attribut where attlib=%s",["to'to"])
cur.execute("insert into Attribut (attCode) values (%s)",["ti'ti"])
cur.execute("select * from attribut where attCode=%s",["ti'ti"])
##cur.execute("select * from attribut where attReq=%s",[x])

print cur.fetchall()

