doc/evfuse_db.txt
changeset 38 1fd4da071575
parent 24 82cfdb6680d1
equal deleted inserted replaced
37:c3880f3b4de8 38:1fd4da071575
     2 Just a simple pure-data filesystem stored in a SQL database. Implementation using PostgreSQL.
     2 Just a simple pure-data filesystem stored in a SQL database. Implementation using PostgreSQL.
     3 No weird dynamic magic.
     3 No weird dynamic magic.
     4 
     4 
     5 
     5 
     6 file_tree:
     6 file_tree:
     7     offset              serial4                 ephemeral counter used to tell one file entry from another
     7     offset              serial4                     ephemeral counter used to tell one file entry from another
     8     name                varchar(256)            the filename
     8     ino                 int4 -> inodes.ino          the file inode
     9     parent              int4 -> inodes.ino      file entry's parent
     9     ino_dir             int4 -> inodes.ino          the file's inode if it's a dir, NULL otherwise
    10     inode               int4 -> inodes.ino      the file's data
    10     name                varchar(256)                the filename
       
    11     parent              int4 -> file_tree.ino_dir   file entry's parent dir
       
    12     
       
    13     unique(ino_dir)
       
    14     unique(name, parent)
    11 
    15 
    12 inodes:
    16 inodes:
    13     ino                 serial4                 inode number
    17     ino                 serial4                 inode number
    14     type                char(3)
    18     type                char(3)
    15             REG                         normal file
    19             REG                         normal file
    16             DIR                         directory
    20             DIR                         directory
       
    21             LNK                         symlink
    17     mode                int2                    file access modes 
    22     mode                int2                    file access modes 
    18     size                int8                    file content size (?)
    23     data                oid                     type=REG -> file data, else NULL
       
    24     link_path           varchar(512)            type=LNK -> symlink target, else NULL
    19 
    25