Postgresql wrapper cookbook