Returning inserted/updated data on postgresql databases

Little optimization, which eliminates unnecessary database query in ORM module while using postgresql.