Since psycopg2's executemany() statement rejects an entire block of insert dicts when only one of them fails a uniqueness constraint, and from a performance perspective doing multiple execute() statements is just as fast, restructed db_utils.insert() accordingly; also unified the error reporting using psycopg2.Error and the code and message it returns.