PostgreSQL unique continue on violation
Check PostgreSQL documentation for detailed syntax for INSERT statement.

In particular, there's an optional ON CONFLICT part:

ON CONFLICT [ conflict_target ] conflict_action



  where conflict_target can be one of:

( { index_column_name | ( index_expression ) } [ COLLATE collation ] [ opclass ] [, ...] )
[ WHERE index_predicate ]
ON CONSTRAINT constraint_name

  
  and conflict_action is one of:

DO NOTHING
DO UPDATE SET { column_name = { expression | DEFAULT } |
                ( column_name [, ...] ) = ( { expression | DEFAULT } [, ...] ) |
                ( column_name [, ...] ) = ( sub-SELECT )
              } [, ...]
          [ WHERE condition ]



In your case, you probably want to append at the end of your INSERT statement:

ON CONFLICT DO NOTHING


and the conflicts will be skipped, and further inserts will continue.

This answer is based on @Akina's comment. Thanks!