[BACK]Return to DBSCHEMA CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.sbin / makemandb

File: [cvs.NetBSD.org] / src / usr.sbin / makemandb / DBSCHEMA (download)

Revision 1.2, Mon May 7 11:18:16 2012 UTC (23 months, 2 weeks ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, agc-symver-base, agc-symver, HEAD
Changes since 1.1: +1 -0 lines

PR 46419 by Abhinav Upadhyay using his updated patch:
Clean up after removing man page aliases.

There are three tables in the database at present:

(1) mandb:
    This is the main FTS table which contains all the content from 
    man pages

  1. section        Section number of the page  
  2. name           The name of the page  
  3. name_desc      The one line description from the NAME section  
  4. desc           Contains the content from DESCRIPTION 
                    section and any other section which 
                    is not indexed in a separate column.
  5. lib            The LIBRARY section
  6. return_vals    RETURN VALUES section
  7. env            ENVIRONMENT section
  8. files          FILES section
  9. exit_status    EXIT STATUS section
  10. diagnostics   DIAGNOSTICS section
  11. errors        ERRORS section
  12. md5_hash      md5 hash of the man page (UNIQUE)
  13. machine       The machine architecture (if any) for which this page is

(2) mandb_meta:
    This table contains md5 hashes of all the indexed man 
    pages. This is there to make sure we do not index 
    the same man page twice, i.e. to prevent indexing 

  1. device         (dev_t)Logical device number from stat(2)
  2. inode          (ino_t)Inode number from stat(2)
  3. mtime          Last modification time from stat(2)
  4. file           Absolute path name (UNIQUE constraint)
  5. md5_hash       MD5 Hash of the man page (UNIQUE)
  6. id             A unique integer ID for the page, which
                    refers to the docid column in mandb (Implicit foreign 
                    key?) PRIMARY KEY
  {device, inode} form a UNIQUE index

(3) mandb_links:
    This is an index of all the hard/soft links of the man 
    pages. The list of the linked pages is usually obtained 
    from the multiple .Nm entries in the page.

  1. link           The name of the hard/soft link (index) 
  2. target         Name of the target page to which it points  
  3. section        The section number  
  4. machine        The machine architecture (if any) for which 
                    the page is relevant
  5. md5_hash       MD5 Hash of the target man page.