home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre1.z / postgre1 / video / script-30 < prev    next >
Encoding:
Text File  |  1992-08-27  |  392 b   |  16 lines

  1. /*
  2.  *  There are two ways to use both functions and attributes.  You can
  3.  *  refer to them in queries using function notation, or you can use
  4.  *  nested dot notation.  Here's an example:  'name' is an attribute of
  5.  *  the 'emp' class, and 'manager' is a function that takes an emp and
  6.  *  returns an emp.
  7.  */
  8.  
  9. retrieve (mgr_name = name(manager(emp)))
  10. \p
  11. \g
  12.  
  13. retrieve (emp.manager.name)
  14. \p
  15. \g
  16.