head	1.3;
access;
symbols
	SUPPORT:1.1.1.1
	PG95-DIST:1.1.1;
locks; strict;
comment	@ * @;


1.3
date	96.11.14.10.14.30;	author scrappy;	state dead;
branches;
next	1.2;

1.2
date	96.10.03.15.49.53;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	96.08.18.22.14.24;	author scrappy;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.08.18.22.14.24;	author scrappy;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Removed man pages...moved to src/man

Requested by Bryan
@
text
@.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /usr/local/cvsroot/postgres95-support/doc/man/fetch.l,v 1.2 1996/10/03 15:49:53 momjian Exp scrappy $
.TH FETCH SQL 01/23/93 Postgres95 Postgres95
.SH NAME
fetch \(em fetch instance(s) from a cursor
.SH SYNOPSIS
.nf
\fBfetch\fR [ (\fBforward\fR | \fBbackward\fR) ] [ ( number | \fBall\fR) ] [\fBin\fR cursor_name]
.fi
.SH DESCRIPTION
.BR Fetch
allows a user to retrieve instances from a cursor named
.IR cursor_name.
The number of instances retrieved is specified by
.IR number .
If the number of instances remaining in the cursor is less than
.IR number ,
then only those available are fetched.  Substituting the keyword
.IR all
in place of a number will cause all remaining instances in the cursor 
to be retrieved.  Instances may be fetched in both
.IR forward
and
.IR backward
directions.  The default direction is
.IR forward .
.PP
Updating data in a cursor is not supported by Postgres, because mapping
cursor updates back to base classes is impossible in general as with
view updates.  Consequently, users must issue explicit replace
commands to update data.
.PP
Cursors may only be used inside of transaction blocks marked by 
.IR begin (l)
and
.IR end (l)
because the data that they store spans multiple user queries.
.SH EXAMPLE
.nf
--
--set up and use a cursor 
--
begin 
   declare mycursor cursor for 
   select * from pg-user
end 
.fi
.nf
--
--Fetch all the instances available in the cursor FOO
--
fetch all in FOO
.fi
.nf
--
--Fetch 5 instances backward in the cursor FOO
--
fetch backward 5 in FOO
.fi
.SH "SEE ALSO"
begin(l),
end(l),
close(l),
move(l),
select(l).
.SH BUGS
Currently, the smallest transaction in Postgres is a single SQL
command.  It should be possible for a single fetch to be a
transaction.
@


1.2
log
@Renamed createdb.l  to create_database.l.
Changed portal to cursor.
@
text
@d3 1
a3 1
.\" $Header: /usr/local/cvsroot/postgres95-support/doc/man/fetch.l,v 1.1.1.1 1996/08/18 22:14:24 scrappy Exp $
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
.\" $Header: /usr/local/cvsroot/postgres95/doc/man/fetch.l,v 1.6 1996/07/31 18:42:57 scrappy Exp $
d34 1
a34 1
Portals may only be used inside of transaction blocks marked by 
d45 1
a45 1
   declare myportal cursor for 
d51 1
a51 1
--Fetch all the instances available in the portal FOO
d57 1
a57 1
--Fetch 5 instances backward in the portal FOO
@


1.1.1.1
log
@Support Docs & Contrib
@
text
@@
