check (not (filetype = 'h' and target is null)),
check (target is null or length(target) between 1 and 4095),
check (hash is null or length(hash) between 1 and 1024),
+ check (path not in ('.', '..')),
check (not (filetype = 'r' and hash is null)),
check (not (filetype = 'c' and device is null)),
check (not (filetype = 'b' and device is null)),