Re: DB-API corner case (psycopg2)

2008-08-01 Thread M.-A. Lemburg
On 2008-08-01 20:38, Thomas Guettler wrote: I forgot to mention where I stumbled about this. Django has a wrapper: http://code.djangoproject.com/browser/django/trunk/django/db/backends/util.py def execute(self, sql, params=()): start = time() try:

Re: DB-API corner case (psycopg2)

2008-08-01 Thread Thomas Guettler
I forgot to mention where I stumbled about this. Django has a wrapper: http://code.djangoproject.com/browser/django/trunk/django/db/backends/util.py def execute(self, sql, params=()): start = time() try: return self.cursor.execute(sq

Re: DB-API corner case (psycopg2)

2008-08-01 Thread Paul Boddie
On 1 Aug, 16:39, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Diez B. Roggisch schrieb: > > Thomas Guettler schrieb: > >> cursor.execute('''SELECT '%' ''', ()) # Does fail > > >> Traceback (most recent call last): > >> File "/localhome/modw/tmp/t.py", line 5, in > >> cursor.execute('''SEL

Re: DB-API corner case (psycopg2)

2008-08-01 Thread M.-A. Lemburg
On 2008-08-01 15:44, Thomas Guettler wrote: Hi, I discovered this: import psycopg2 connection=psycopg2.connect("dbname='...' user='...'") cursor=connection.cursor() cursor.execute('''SELECT '%' ''') # Does not fail cursor.execute('''SELECT '%' ''', ()) # Does fail Traceback (most recent call l

Re: DB-API corner case (psycopg2)

2008-08-01 Thread Diez B. Roggisch
Diez B. Roggisch schrieb: Thomas Guettler schrieb: Hi, I discovered this: import psycopg2 connection=psycopg2.connect("dbname='...' user='...'") cursor=connection.cursor() cursor.execute('''SELECT '%' ''') # Does not fail cursor.execute('''SELECT '%' ''', ()) # Does fail Traceback (most recen

Re: DB-API corner case (psycopg2)

2008-08-01 Thread Diez B. Roggisch
Thomas Guettler schrieb: Hi, I discovered this: import psycopg2 connection=psycopg2.connect("dbname='...' user='...'") cursor=connection.cursor() cursor.execute('''SELECT '%' ''') # Does not fail cursor.execute('''SELECT '%' ''', ()) # Does fail Traceback (most recent call last): File "/loca