Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: cursors


  • From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
  • To: "Cesar Alvarez" <c(dot)alvarezx66(at)gmail(dot)com>
  • Cc: "PGSQL GEneral Mailing list" <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: cursors
  • Date: Sat, 24 Nov 2007 23:23:32 +0100
  • Message-id: <162867790711241423i6707b240gcefa41c43709a51f(at)mail(dot)gmail(dot)com>

On 24/11/2007, Cesar Alvarez <c(dot)alvarezx66(at)gmail(dot)com> wrote:
>
>  Hello every one.
>  im trying to make a Loop and i found in the manual this.
>
>  FOR <target> IN <query> LOOP
>      <statements>
>  END LOOP
>
>  Can i use cursor instead of the Query in the loop?? ,
>  this es more legible than using the open/fetch/close of the cursor.
>
>  Regard Cesar Alvarez.

Hello

FOR statement use cursor internally. If you wont to use cursor
explicitly, you have to use WHILE loop.

Regards
Pavel Stehule

>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>
>


  • References:

Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group