initial implementation against postgresql