Insert event records in postgres.