How to fix Read only SQL transaction in PostgreSQL | DevErrors