simple read/write using postgres