Re: pgsql and cursor - Mailing list pgsql-sql

From Ian Lance Taylor
Subject Re: pgsql and cursor
Date
Msg-id si8znfh7yp.fsf@daffy.airs.com
Whole thread Raw
In response to pgsql and cursor  (Najm Hashmi <najm@mondo-live.com>)
List pgsql-sql
Najm Hashmi <najm@mondo-live.com> writes:

> Hi all, I am not sure If it is allowed to use cursor inside pgsql functions.
> If it is possible, please someone could send exact synatx  how it is used. If
> it is not allowed  is there a way arround it? I need to do some calculations
> and then return this value as text.

Cursors are not supported in PL/pgSQL.  (You can, however, use FOR to
loop over a query).

For a patch to add cursor support to PL/pgSQL, see   http://www.airs.com/ian/pgsql-cursor.html

Ian


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: String Concatnation
Next
From: Jie Liang
Date:
Subject: Re: What's wrong with this function