Using postgresql for database