Re: usring CURSORS within functions - Mailing list pgsql-general

From Tom Lane
Subject Re: usring CURSORS within functions
Date
Msg-id 3792.1006112595@sss.pgh.pa.us
Whole thread Raw
In response to usring CURSORS within functions  ("SunMie Won" <sunmiewon@yahoo.com>)
List pgsql-general
"SunMie Won" <sunmiewon@yahoo.com> writes:
> Any tips on how to use a cursor within a function?

You don't, at least not before 7.2.  The 7.2 support for cursors
in plpgsql is documented in the development docs:
http://candle.pha.pa.us/main/writings/pgsql/sgml/plpgsql-cursors.html
I don't really know why the syntax is what it is; it's a tad odd and
not anything like the normal SQL DECLARE x CURSOR.  Possibly Jan
borrowed it from Oracle.

            regards, tom lane

pgsql-general by date:

Previous
From: "SunMie Won"
Date:
Subject: usring CURSORS within functions
Next
From: Sharon Cowling
Date:
Subject: Problem with type in rule