pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Matthew Hagerty <matthew@venux.net>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Stepping through a table.
Date: Mon, 16 Aug 1999 12:19:11 +0300
Message-ID: <l03130300b3dd85696085@[147.233.159.109]> (raw)
In-Reply-To: <4.1.19990815225433.00cb6c20@mail.venux.net>

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





view thread (4+ messages)  latest in thread

Message-ID: <l03130300b3dd85696085@[147.233.159.109]>
Permalink:  ../l03130300b3dd85696085@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03130300b3dd85696085@[147.233.159.109]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: herouth@oumail.openu.ac.il, matthew@venux.net
  Subject: Re: [SQL] Stepping through a table.
  In-Reply-To: <l03130300b3dd85696085@[147.233.159.109]>
  References: <4.1.19990815225433.00cb6c20@mail.venux.net> <l03130300b3dd85696085@[147.233.159.109]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox