Named Cursor Basics
Named Cursor Basics
От:
maplabs@light42.com
Дата:
Hi All- thanks for the re-invigoration of psycopg2.. looking forward to great things.. I have a big, big table, and I want to iterate through each record once. I am not clear on using named cursor and pages though.. I tried a simple example late last night, and it iterated twice then stopped. Today, after a bit more reading, I tried again in the interactive shell, but got OperationalError: cursor "tmp" does not exist There is something I am missing.. this is so fundemental.. executing a select * on the table with a non-named cursor does not appear to be an option.. I have psycopg2 2.4.1 built from source and installed on linux. Pg 9 thanks -Brian
Re: Named Cursor Basics
От:
Federico Di Gregorio <federico.digregorio@dndg.it>
Дата:
On 19/05/11 22:52, maplabs@light42.com wrote: > thanks for the re-invigoration of psycopg2.. looking forward to > great things.. > > I have a big, big table, and I want to iterate through each record once. > I am > not clear on using named cursor and pages though.. > > I tried a simple example late last night, and it iterated twice > then stopped. > Today, after a bit more reading, I tried again in the interactive > shell, but got > > OperationalError: cursor "tmp" does not exist Can you show us the code? federico -- Federico Di Gregorio federico.digregorio@dndg.it Studio Associato Di Nunzio e Di Gregorio http://dndg.it I porcellini di terra sono davvero Crostacei! Non lo sapevo! Certo che sono crostacei, hanno la crosta! Allora la pizza è un crostaceo?! -- discorso all'ESC2k07