Re: copy_from and rowcount
От | Federico Di Gregorio |
---|---|
Тема | Re: copy_from and rowcount |
Дата | |
Msg-id | 523C55E3.3010101@dndg.it обсуждение исходный текст |
Ответ на | copy_from and rowcount (Ryan Kelly <rpkelly22@gmail.com>) |
Ответы |
Re: copy_from and rowcount
|
Список | psycopg |
On 12/09/2013 18:06, Ryan Kelly wrote: > I'm wondering if it's possible to get the number of rows copied when > using copy_from? I would've thought the .rowcount attribute of the cursor > would have this value, but that doesn't seem to be the case. Sorry for the late asnwer. If I remember correctly the libpq docs don't say if it is possible to retrieve the number of inserted columns and we're not sending data line-by-line but as chunks so counting the lines isn't possible. Maybe (a big maybe) the final PGresult contains that but I can't find this documented anywhere. We'll need to instrument psycopg to print PGresult fields and do a bit of guesswork. federico -- Federico Di Gregorio federico.digregorio@dndg.it Di Nunzio & Di Gregorio srl http://dndg.it Those who do not study Lisp are doomed to reimplement it. Poorly. -- from Karl M. Hegbloom .signature
В списке psycopg по дате отправления: