home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre2.z / postgre2 / ref / postquel / fetch < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.8 KB  |  72 lines

  1. .\" XXX standard disclaimer belongs here....
  2. .\" $Header: /private/postgres/ref/postquel/RCS/fetch,v 1.6 1992/07/14 05:54:17 ptong Exp $
  3. .SP FETCH COMMANDS 6/14/90
  4. .XA 2 Fetch
  5. .uh NAME
  6. .lp
  7. fetch \*- fetch instance(s) from a portal 
  8. .uh SYNOPSIS
  9. .lp
  10. .(l
  11. \fBfetch\fR [ (\fBforward\fR | \fBbackward\fR) ] [ ( number | \fBall\fR) ] [\fBin\fR portal_name]
  12. .)l
  13. .uh DESCRIPTION
  14. .lp
  15. .b Fetch
  16. allows a user to retrieve instances from a portal named
  17. .i portal_name .
  18. The number of instances retrieved is specified by
  19. .i number .
  20. If the number of instances remaining in the portal is less than
  21. .i number ,
  22. then only those available are fetched.
  23. Substituting the keyword
  24. .b all
  25. in place of a number will cause all remaining instances in the portal
  26. to be retrieved.
  27. Instances may be fetched in both
  28. .i forward
  29. and
  30. .i backward
  31. directions.
  32. The default direction is 
  33. .i forward .
  34. .lp
  35. Updating data in a portal is not supported by \*(PP,
  36. because mapping portal updates back to base classes is impossible
  37. in general as with view updates.
  38. Consequently, users must issue
  39. explicit replace commands to update data.
  40. .lp
  41. Portals may only be used inside of
  42. \fBbegin\fP/\fBend\fP transaction blocks,
  43. since the data that they store spans multiple user queries.
  44. .uh EXAMPLE
  45. .lp
  46. .nf
  47. .ft C
  48. /* set up and use a portal */
  49.    begin \eg
  50.    retrieve portal myportal (pg_user.all) \eg
  51.    fetch 2 in myportal \eg
  52.    fetch all in myportal \eg
  53.    close myportal \eg
  54.    end \eg
  55.  
  56. /* Fetch all the instances available in the portal FOO */
  57.    fetch all in FOO
  58.     
  59. /* Fetch 5 instances backward in the portal FOO */
  60.    fetch backward 5 in FOO
  61. .ft
  62. .fi
  63. .uh "SEE ALSO"
  64. .lp
  65. retrieve(commands),
  66. close(commands),
  67. move(commands).
  68. .uh BUGS
  69. .lp
  70. Currently, the smallest transaction in \*(PP is a single
  71. \*(PQ command.  It should be possible for a single fetch to be a transaction.
  72.