layer of abastraction for postgres