Received: from foghorn.airs.com (foghorn.airs.com [63.201.54.26]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f19LHfx26058 for ; Fri, 9 Feb 2001 16:17:41 -0500 (EST) (envelope-from ian@airs.com) Received: (qmail 3425 invoked by uid 10); 9 Feb 2001 21:17:39 -0000 Received: (qmail 12487 invoked by uid 269); 9 Feb 2001 21:17:34 -0000 To: Najm Hashmi Cc: pgsql Subject: Re: pgsql and cursor References: <3A8566CF.AE8414C0@mondo-live.com> From: Ian Lance Taylor Date: 09 Feb 2001 13:17:34 -0800 In-Reply-To: Najm Hashmi's message of "Sat, 10 Feb 2001 11:05:35 -0500" Message-ID: Lines: 14 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200102/183 X-Sequence-Number: 1370 Najm Hashmi 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