Hi all,
I have an error while using the delete method on a table. The code is
quite simple, delete a row which I got through a SELECT query.
table=billinginfo
for row in result.dictresult():
db.delete(table, row)
The python error is :
Traceback (most recent call last):
File "billingArchiver.py", line 33, in ?
db.delete('billinginfo', row)
File "/usr/local/lib/python2.3/site-packages/pg.py", line 523, in delete
q = 'DELETE FROM %s WHERE oid=%s' % (qcl, a[foid])
KeyError: 'oid(public.billinginfo)'
Well, as I connect to the postgresql DB to sort things out, I can see :
billing_arch=# select oid from pg_class WHERE relname='billinginfo';
oid
-------
16475
(1 row)
billing_arch=# select oid from pg_class WHERE relname='public.billinginfo';
oid
-----
(0 rows)
Is it normal for the delete() method to build its qcl whith the
'public.' prefix ? How can I use the delete method in this case ?
Can I expect the delete method to be quicker than doing a query "DELETE FROM " ?
Thank you for your help.
Jonathan
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql