Railings, partitions and lattices