DRY PostgreSQL adapter