Behaviour of Bulk Insert in pgsql or any Database
Your statement runs in a transaction. If there is not already a transaction open, a transaction is created just for this statement and automatically committed at the end if the statement succeeds.

If the statement encounters an error, the transaction is rolled back automatically, so it has no effect.

Either the whole statement takes effect or none of it does.

(Note that you could've just tried it to determine this).