I'm using PostgreSQL 9.2.4.
I'm working with multiple tables with large number of data.
I have two tables Table_One which has one of the field with varchar(250) and Table_Two with one of the field varchar(200).
Lets say, Table_One has 20 records in which 2 records has field with 250 characters.
I'm doing a bulk insert by some query like below
insert into Table_Two(id, INSTANCEwithVarchar, MIN, MAX)(SELECT id, INSTANCEwithVarchar, MIN, MAX from Table_One)
I will get an exception while inserting the record of Table_One which has varchar 250.
My question is,
Will Table_Two has 18 records inserted?
Or bulk insert into Table_Two will fail completely even if one record among the 20 gets violate the constraints?
If not, say if Table_Two has 18 records added, then in what order the failure will happen? if the first record of Table_One has varchar 250, then will the whole process fail or pgsql itself ignores failures and add remaining records successfully?
(Using PostgreSQL 9.2)