Postgresql Insert Data Into Table Using For Loop