working postgres interaction