Re: usring CURSORS within functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sunmiewon(at)yahoo(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: usring CURSORS within functions
Date: 2001-11-18 19:43:15
Message-ID: 3792.1006112595@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"SunMie Won" <sunmiewon(at)yahoo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sharon Cowling 2001-11-18 21:17:00 Problem with type in rule
Previous Message SunMie Won 2001-11-18 19:12:02 usring CURSORS within functions