Received: from mx99.openu.ac.il (arbel.openu.ac.il [147.233.32.4]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA42795 for ; Mon, 16 Aug 1999 05:17:53 -0400 (EDT) (envelope-from herouth@oumail.openu.ac.il) Received: from talmon.openu.ac.il (talmon.openu.ac.il [147.233.32.11]) by mx99.openu.ac.il (Postfix) with ESMTP for id E51194B66C; Mon, 16 Aug 1999 12:17:51 +0300 (IDT) Received: from [147.233.159.109] (mac-herouth.pc.openu.ac.il) by talmon.openu.ac.il (Netscape Messaging Server 3.54) with ESMTP id AAA519D; Mon, 16 Aug 1999 12:21:27 +0300 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: <4.1.19990815225433.00cb6c20@mail.venux.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 16 Aug 1999 12:19:11 +0300 To: Matthew Hagerty , pgsql-sql@postgreSQL.org From: Herouth Maoz Subject: Re: [SQL] Stepping through a table. At 05:58 +0300 on 16/08/1999, Matthew Hagerty wrote: > If I need to process each record in a table, how can I step through each > record? I suppose I could write a query to return all records and fetch > each row that way, but that would be a big memory pig, no? Also, the table > could get pretty big. Is there some way to navigate a table, maybe > fetching one record from the disk at a time, or something similar? I guess you are looking for cursors. Read about it on page 154 of the PostgreSQL user guide, or check out the manpage about "declare". Note that PostgreSQL cursors are readonly, and can't be used to update information. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma