Re: Cursores

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Conrado Blasetti <conrado(at)mapfre(dot)com(dot)ar>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Cursores
Date: 2005-10-26 18:22:42
Message-ID: 20051026182241.GA27006@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Conrado Blasetti escribió:
> Alvaro, gracias por responder.
> En la documentación figura tal cual me sugeris el abrir el cursor, y hacer
> el fetch entre otras cosas.
> El fetch me funciona sin problema.
> El inconveniente viene con el for loop, haciendo el open (antes del for) y
> el close (luego del end loop) tampoco funciona.

Vaya, yo pense que podia funcionar pero evidentemente no es asi.
Simplemente olvidate del cursor y declara el SELECT en el loop. Si te
fijas en la documentacion de LOOP, en ninguna parte dice que puedas usar
el cursor ahi. Tienes que especificar el SELECT directamente.

--
Alvaro Herrera Developer, http://www.PostgreSQL.org
You liked Linux a lot when he was just the gawky kid from down the block
mowing your lawn or shoveling the snow. But now that he wants to date
your daughter, you're not so sure he measures up. (Larry Greenemeier)

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Conrado Blasetti 2005-10-26 18:57:18 RE: Cursores
Previous Message dkuroki 2005-10-26 18:20:38 Re: transformar funciones y procedimientos almacenados desde M$SQLServer a PostgreSQL